Friday, 13 October 2017

EProgrammerNotFound exception in Delphi?

itemprop="text">

In Delphi 2009, SysUtils.pas contains
this in line
425:



EProgrammerNotFound =
class(Exception);




  • Is
    this simply an href="http://en.wikipedia.org/wiki/Easter_egg_%28media%29#Software-based"
    rel="noreferrer">easter egg or something
    serious?

  • When should this exception be
    raised?

  • Does it also exist in Delphi Prism and/or Free
    Pascal?



/>


Q: Is this exception class still declared
in Delphi (currently XE7)?
A: Yes, and it is even href="http://docwiki.embarcadero.com/Libraries/XE7/en/System.SysUtils.EProgrammerNotFound"
rel="noreferrer">documented!





Nonstandard way to indicate software faults.




You can use EProgrammerNotFound as an alternative to indicate
software
faults detected at run
time.



class="post-text" itemprop="text">
class="normal">Answer





It is just the result of a long
day and we had gotten a little giddy. For many, many years (ever since I'd been on the
team), we'd always joked about replacing some error message in the compiler for one of
the most common errors with a similar message. Internally we've always joked and poked
fun at different things and people (mostly on the team itself). If you don't have a
sense of humor, you're destined to an early
grave.



It was a simple conversation;



"Oh, you should have raised the
EProgrammerNotFound exception in that function."
"LOL! We should add that
exception and see who notices."
"I wonder how much speculation there will be
about why it is there?"



So, I guess all I can
say is, "You've all played right into our hands ;-)... Buwahahaha!
pwned!"


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...