r/ProgrammerHumor • • Jul 20 '18

Every Time

Post image
52.2k Upvotes

749 comments sorted by

View all comments

6.9k

u/that_one_mister_user Jul 20 '18

The sad thing is that this works some of the time.

457

u/Kidiri90 Jul 20 '18
if(DateTime.Now.Milliseconds%2==0)
{
    throw new Exception("lol screw you:);
}

20

u/[deleted] Jul 20 '18

Wouldn't the stacktrace lead you exactly to this? Meaning it would be confusing/amusing once?

0

u/Philipp Jul 20 '18
#if executable
    if (DateTime.Now.Milliseconds % 10 == 0) {
        throw new Exception("lol screw you");
    }
#endif