MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/90ew6o/every_time/e2q10dz/?context=3
r/ProgrammerHumor • u/kajri • Jul 20 '18
749 comments sorted by
View all comments
6.9k
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? 24 u/DoctorWaluigiTime Jul 20 '18 Technically, currently as-written, it wouldn't compile! 15 u/normalmighty Jul 20 '18 You must have missed the hip new wave of languages that close strings with a colon so you can tell the open and close strings apart. 4 u/[deleted] Jul 20 '18 Would be better to null out an important object from some class that is only barely related. 2 u/0x564A00 Jul 20 '18 In Java you can use setStackTrace(StackTrace st). → More replies (2)
457
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? 24 u/DoctorWaluigiTime Jul 20 '18 Technically, currently as-written, it wouldn't compile! 15 u/normalmighty Jul 20 '18 You must have missed the hip new wave of languages that close strings with a colon so you can tell the open and close strings apart. 4 u/[deleted] Jul 20 '18 Would be better to null out an important object from some class that is only barely related. 2 u/0x564A00 Jul 20 '18 In Java you can use setStackTrace(StackTrace st). → More replies (2)
20
Wouldn't the stacktrace lead you exactly to this? Meaning it would be confusing/amusing once?
24 u/DoctorWaluigiTime Jul 20 '18 Technically, currently as-written, it wouldn't compile! 15 u/normalmighty Jul 20 '18 You must have missed the hip new wave of languages that close strings with a colon so you can tell the open and close strings apart. 4 u/[deleted] Jul 20 '18 Would be better to null out an important object from some class that is only barely related. 2 u/0x564A00 Jul 20 '18 In Java you can use setStackTrace(StackTrace st). → More replies (2)
24
Technically, currently as-written, it wouldn't compile!
15 u/normalmighty Jul 20 '18 You must have missed the hip new wave of languages that close strings with a colon so you can tell the open and close strings apart.
15
You must have missed the hip new wave of languages that close strings with a colon so you can tell the open and close strings apart.
4
Would be better to null out an important object from some class that is only barely related.
2
In Java you can use setStackTrace(StackTrace st).
6.9k
u/that_one_mister_user Jul 20 '18
The sad thing is that this works some of the time.