Friday, 10 January 2014

Exceptions, Excepting their Exception... An Adventure into Stack Overflow Hell

If you're going to throw exceptions, and display those exceptions, don't let the code showing exceptions throw exceptions...

This may seem very obvious to those of you out there with a modicum of common sense, it may seem simple and you might be saying... "Xel, why the fuck are you pointing out the obvious to us?"

Because you know this... And you know I know this... Its common sense right... Right?... RIGHT!??!?!!?

No it's not, cus I've just spent half an hour banging my head against the screen, with half a collection of machines working fine, but the other half not operating and throwing spurious errors out of mscorelib...

The error being "File Not Found"... Well, the reason that we got this error was that the system was trying to tell us something, but as it was trying to tell us, the formatting for the fancy exception screen was missing, and so the exception caused an exception... And to add insult to injury the exception from the exception, caused an exception, and eventually this shitty code ended in a Stack Over Flow exception... Which... yes you guessed it, caused an exception... it all just collapsed horribly.

So, people, keep it simple, and keep it stupid!  Because this saves me time, energy & worry!

No comments:

Post a Comment