Comment On Error-prone Errors

"Sometimes, web applications error out," Brian writes via the Submit to The Daily WTF plug-in. "In ASP.NET, a simple web.config entry will redirect all errors to a given location like, errors.aspx. On that page, you can call Server.GetLastError() to get all the error deatils you'd like, including a full stack trace. For more advanced scenarios, you can use the Application_Error event to log errors. " [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: Error-prone Errors

2011-06-01 09:01 • by Worse than worse than failure (unregistered)
I can one up this.

This exact same thing... but this time, in an access database.

Re: Error-prone Errors

2011-06-01 09:13 • by simple (unregistered)
348599 in reply to 348597
I can one up that:

The exact same thing but the error reporting involves sending an email with all details including a stack trace. Email after email, in rapid succession, each one growing exponentially in size until everything is brought to an abrupt and fatal halt.....

Re: Error-prone Errors

2011-06-01 09:17 • by Nagesh (unregistered)
Nothing should be going recursive: xml message generating is fooling-proof.

Re: Error-prone Errors

2011-06-01 09:19 • by Tundey (unregistered)
Funny thing is that this monstrosity was probably written by a "smart" developer.

Re: Error-prone Errors

2011-06-01 09:22 • by Steve The Cynic
348602 in reply to 348599
simple:
I can one up that:

The exact same thing but the error reporting involves sending an email with all details including a stack trace. Email after email, in rapid succession, each one growing exponentially in size until everything is brought to an abrupt and fatal halt.....

Or strap a couple of sticks of dynamite to the side of the server, and wire a detonator to the parallel port...

Re: Error-prone Errors

2011-06-01 09:22 • by frits
Surely this was discovered during integration and/or unit testing? Right?

Re: Error-prone Errors

2011-06-01 09:27 • by Patryk Zawadzki
348604 in reply to 348597
Worse than worse than failure:
I can one up this.

This exact same thing... but this time, in an access database.


Nope, that wouldn't allow the end user to read your stack trace, possibly containing sensitive data or revealing some sort of exploitation vector. If you one-up, at least provide compatible features!

Re: Error-prone Errors

2011-06-01 09:29 • by thedailywtf.com (unregistered)
348605 in reply to 348601
Tundey:
Funny thing is that this monstrosity was probably written by a "smart" developer.

You mean, a CS college graduate?

Re: Error-prone Errors

2011-06-01 09:32 • by anonymous (unregistered)
348606 in reply to 348600
Never underestimate the ingenuity of a fool.

Re: Error-prone Errors

2011-06-01 09:33 • by Alex (unregistered)
This is why XML is retarded and JSON is better.

Re: Error-prone Errors

2011-06-01 09:34 • by A College CS Graduate (unregistered)
348608 in reply to 348605
thedailywtf.com:
Tundey:
Funny thing is that this monstrosity was probably written by a "smart" developer.

You mean, a CS college graduate?

What the IT industry needs is less college educated workers!

Re: Error-prone Errors

2011-06-01 09:35 • by frits
I wonder if the "circle of recursive fail" has ever actually happened, or if that was just speculation. I don't see a lot of potential failure points. Maybe if the logger fails, but if that's the case, you're probably either totally screwed or not in production.

BTW- Recursion usually fails in a spiral, no?

Re: Error-prone Errors

2011-06-01 09:51 • by Mcoder
348610 in reply to 348607
Alex:
This is why XML is retarded and JSON is better.


Or, came-on... Everybody knows that the best way to dispatch an error is by a CORBA message tunneled through HTTP.

And, I'm sad, I can't one-up this one. The worst case of error handling I've seen is the logger initializing trying to log its errors to the logger it is initializing.

Re: Error-prone Errors

2011-06-01 10:10 • by StupidTheKid (unregistered)
348611 in reply to 348610
Mcoder:
And, I'm sad, I can't one-up this one. The worst case of error handling I've seen is the logger initializing trying to log its errors to the logger it is initializing.


You sir möbius my day.

Re: Error-prone Errors

2011-06-01 10:15 • by Steve The Cynic
348612 in reply to 348610
Mcoder:
Alex:
This is why XML is retarded and JSON is better.


Or, came-on... Everybody knows that the best way to dispatch an error is by a CORBA message tunneled through HTTP.

And, I'm sad, I can't one-up this one. The worst case of error handling I've seen is the logger initializing trying to log its errors to the logger it is initializing.

What about catch(...) on Visual C++ 6? Swallows all exceptions, including non-C++ SEH exceptions, like 0xC0000005 GPF... Sure, it makes your program not crash, but so what?

Re: Error-prone Errors

2011-06-01 10:20 • by Manadar (unregistered)
TRWTF is that he bothered to log at all.

Re: Error-prone Errors

2011-06-01 10:21 • by TheCPUWizard
348614 in reply to 348602
Steve The Cynic:
Or strap a couple of sticks of dynamite to the side of the server, and wire a detonator to the parallel port...


I did something similar (almost 30 years ago) but it was "Sparklers" and Smoke....startled the hell out of the people around when the PC loked like a 4th of july [USA holiday] celebration.

Re: Error-prone Errors

2011-06-01 10:22 • by RFA (unregistered)
I am wondering: what IS the correct way of sending an e-mail message to the system administrator to let him know the server messed up?
Use a seperate cronjob to check the logfiles?

Re: Error-prone Errors

2011-06-01 10:58 • by iToad (unregistered)
348620 in reply to 348599
simple:
I can one up that:

The exact same thing but the error reporting involves sending an email with all details including a stack trace. Email after email, in rapid succession, each one growing exponentially in size until everything is brought to an abrupt and fatal halt.....


The IT equivalent of a criticality accident. Except without the mushroom cloud.

Re: Error-prone Errors

2011-06-01 11:17 • by operagost
348622 in reply to 348602
Steve The Cynic:
simple:
I can one up that:

The exact same thing but the error reporting involves sending an email with all details including a stack trace. Email after email, in rapid succession, each one growing exponentially in size until everything is brought to an abrupt and fatal halt.....

Or strap a couple of sticks of dynamite to the side of the server, and wire a detonator to the parallel port...

I did the same thing, but used the CD ROM drive instead of the parallel port. I called it ITAPPBOMBROBOT.

Re: Error-prone Errors

2011-06-01 11:19 • by Martin (unregistered)
348623 in reply to 348616
RFA:
I am wondering: what IS the correct way of sending an e-mail message to the system administrator to let him know the server messed up?
Use a seperate cronjob to check the logfiles?


Use a proper monitoring tool that has been designed for the task, preferably the one that the rest of your organisation is using to monitor errors on a system/application/performance basis.

Nagios is free, HTH. :)

Re: Error-prone Errors

2011-06-01 11:20 • by Eric (unregistered)
348624 in reply to 348601
Tundey:
Funny thing is that this monstrosity was probably written by a "smart" developer.


It's really not far off of what our 'Senior developer' designed in our first couple ASP.Net apps a few years back. She was fond of referring to herself as 'genius' and seemed to think this was rather a clever solution. (A solution to what I'm not sure of)

And in our case, the legacy app it was extending wrote most of its logging to a database table where as our fancy new XML log... didn't. So in addition to making it harder to do proper error handling and tracking, it made it harder for the help desk to track down problems because half of them weren't in the proper log file.

Re: Error-prone Errors

2011-06-01 11:33 • by C-Octothorpe
348627 in reply to 348624
Eric:
Tundey:
Funny thing is that this monstrosity was probably written by a "smart" developer.


It's really not far off of what our 'Senior developer' designed in our first couple ASP.Net apps a few years back. She was fond of referring to herself as 'genius' and seemed to think this was rather a clever solution. (A solution to what I'm not sure of)

And in our case, the legacy app it was extending wrote most of its logging to a database table where as our fancy new XML log... didn't. So in addition to making it harder to do proper error handling and tracking, it made it harder for the help desk to track down problems because half of them weren't in the proper log file.



I have a confession to make: I too created a logger that wrote to an XML file... *weeps*

It wasn't my idea though! Actually I was forced to by my systems analyst. The argument was that if the database was down, you would loose the logs, which is an OK argument, but all that you'll be logging then is errors saying the DB is down.

Anyway, the XML was another "requirement" pushed on to me because it was still the be all and end all of everything that is and SHOULD be IT...

Oh, and let's not mention the scalability issues with writing to a single log file on a SAN in a web farm that requires locking the file for writing... Oh, and you have to load the whole document into memory to append a single "error" node (I optimized this to only append to the file; a bit better, but still not great).

Re: Error-prone Errors

2011-06-01 11:36 • by Oik (unregistered)
348628 in reply to 348608
Yup, definitely true that. Number of certificates is inversely proportional to ability.

I was once asked by a certificate holding MCSE how to install NT on his computer. Problems were....... IDE drives, SCSI controller (but hey if you ram the IDE connector in the socket it'll sort-of fit), I had an IDE controller so we could have gotten around that but the real killer was the processor - a 286, even NT won't run on a pocket calculator.

Turns out he'd completed a whole MCSE course and got a good pass without ever actually touching a computer.

Re: Error-prone Errors

2011-06-01 11:37 • by D (unregistered)
I was once reviewing contractor code that in the error portion of the code would write entries to the database. Since this didn't include any try-catch, any errors would generate another error. You could get the server running the code to stop responding by disabling the database (on a different server).

My only regret is that I wasn't more involved in the development so that when he first wrote it I could have messed with him.

Re: Error-prone Errors

2011-06-01 11:46 • by C-Octothorpe
From TFA:

//This is a code snippet for serializing Exceptions using LINQ


Isn't this exactly what LINQ was created for?

... when all the problems you have look like nails...

Re: Error-prone Errors

2011-06-01 11:47 • by Ed (unregistered)
348631 in reply to 348610
Mcoder:

And, I'm sad, I can't one-up this one. The worst case of error handling I've seen is the logger initializing trying to log its errors to the logger it is initializing.


That reminds me of the error handler that tried to look up the translation for 'no connection to database' in the database it could not connect to.

Re: Error-prone Errors

2011-06-01 11:51 • by TW (unregistered)
348632 in reply to 348609
frits:
I wonder if the "circle of recursive fail" has ever actually happened, or if that was just speculation. I don't see a lot of potential failure points. Maybe if the logger fails, but if that's the case, you're probably either totally screwed or not in production.

BTW- Recursion usually fails in a spiral, no?


Yes. Unless it's optimized for tail recursion.

Re: Error-prone Errors

2011-06-01 12:06 • by emurphy
348633 in reply to 348616
I have it built into the ASP.NET code, but with an explicit check for "if it's cascaded more than a couple levels then give up".

I'll bear Nagios in mind, but our sysadmin department is understaffed as it is (I'm an application dev) and I'm not inclined to recommend throwing a new tool into the mix when I only vaguely understand the various benefits it might offer.

Re: Error-prone Errors

2011-06-01 12:15 • by C-Octothorpe
348636 in reply to 348632
TW:
frits:
I wonder if the "circle of recursive fail" has ever actually happened, or if that was just speculation. I don't see a lot of potential failure points. Maybe if the logger fails, but if that's the case, you're probably either totally screwed or not in production.

BTW- Recursion usually fails in a spiral, no?


Yes. Unless it's optimized for tail recursion.


True, but only on x64 envs, AFAIK...

So what you have is a 64 bit, tail recursive spiral of failure.

SWEET!

Re: Error-prone Errors

2011-06-01 12:30 • by Benjamin (unregistered)
348638 in reply to 348602
TRWTF is any computer that still has a parallel port.

Re: Error-prone Errors

2011-06-01 12:32 • by Anon (unregistered)
348639 in reply to 348628
Oik:
Yup, definitely true that. Number of certificates is inversely proportional to ability.


So a person without any certification has the highest level of knowledge and skill?

Re: Error-prone Errors

2011-06-01 12:43 • by Ralph (unregistered)
348640 in reply to 348628
Oik:
...Turns out he'd completed a whole MCSE course and got a good pass without ever actually touching a computer.
MCSE == Must Call Somebody Experienced

But you knew that, right?

Re: Error-prone Errors

2011-06-01 12:54 • by Spoe (unregistered)
348642 in reply to 348639
Anon:
Oik:
Yup, definitely true that. Number of certificates is inversely proportional to ability.


So a person without any certification has the highest level of knowledge and skill?


No, they have undefined knowledge and skill.

Re: Error-prone Errors

2011-06-01 13:05 • by Christopher (unregistered)
348644 in reply to 348636
C-Octothorpe:
TW:
frits:
I wonder if the "circle of recursive fail" has ever actually happened, or if that was just speculation. I don't see a lot of potential failure points. Maybe if the logger fails, but if that's the case, you're probably either totally screwed or not in production.

BTW- Recursion usually fails in a spiral, no?


Yes. Unless it's optimized for tail recursion.


True, but only on x64 envs, AFAIK...

So what you have is a 64 bit, tail recursive spiral of failure.

SWEET!

What has x64 to do with tail call optimization? You can optimize tail calls on almost any architecture­—x86, PPC, Z80, 68000, etc.

Unless you're only talking specifically about .NET, in which case TRWTF is .NET.

Re: Error-prone Errors

2011-06-01 13:12 • by C-Octothorpe
348645 in reply to 348644
Christopher:
Unless you're only talking specifically about .NET, in which case TRWTF is .NET.


You got the low-hanging fruit I see (or low hanging-fruit, just to make some grammar nazis eyes twitch with pedantic-fueled rage)...

And yes, I was talking specifically about .Net, but they claim that it's OK because they say (disclaim) in the spec to not count on this optimization as it's only currently supported in x64 (can't find the link now).

Re: Error-prone Errors

2011-06-01 13:13 • by CCIE, CISSP< et al (unregistered)
348646 in reply to 348628
Oik:
Yup, definitely true that. Number of certificates is inversely proportional to ability.


Hello there... just sit over there, we'd like to have a little talk with you.

Re: Error-prone Errors

2011-06-01 13:19 • by C-Octothorpe
348647 in reply to 348646
CCIE, CISSP< et al:
Oik:
Yup, definitely true that. Number of certificates is inversely proportional to ability.


Hello there... just sit over there, we'd like to have a little talk with you.


Certifications are to hiring managers as shiny pieces of aluminum foil are to monkeys... Simple things impress simple people.

That's not to say that I don't have certifications, or plan on getting more in the future. All I know is the reality and that getting certs doesn't make you "better", it just means you know how to play the game, thats all.

Re: Error-prone Errors

2011-06-01 13:22 • by Dazed (unregistered)
348648 in reply to 348614
TheCPUWizard:

I did something similar (almost 30 years ago) but it was "Sparklers" and Smoke....startled the hell out of the people around when the PC loked like a 4th of july [USA holiday] celebration.

Yeah, like there were PC's around almost 30 years ago.

...

...

Hell!! It really was almost 30 years ago! You've just ruined my weekend (and it's only Wednesday.)

Re: Error-prone Errors

2011-06-01 13:43 • by Mr. Clean (unregistered)
348649 in reply to 348636
C-Octothorpe:
...AFAIK...

I've been coming here long enough...I won't assume you know anything.

Re: Error-prone Errors

2011-06-01 13:46 • by facilisi (unregistered)
Obviously a former Java programmer.

Re: Error-prone Errors

2011-06-01 14:00 • by trtrwtf (unregistered)
348651 in reply to 348645
C-Octothorpe:
Christopher:
Unless you're only talking specifically about .NET, in which case TRWTF is .NET.


You got the low-hanging fruit I see (or low hanging-fruit, just to make some grammar nazis eyes twitch with pedantic-fueled rage)...


I see what you did-there...

Re: Error-prone Errors

2011-06-01 14:04 • by C-Octothorpe
348652 in reply to 348649
Mr. Clean:
C-Octothorpe:
...AFAIK...

I've been coming here long enough...I won't assume you know anything.


Wow, did you come up with that razor-sharp retort all by yourself?

Re: Error-prone Errors

2011-06-01 14:12 • by yaki mando (unregistered)
348654 in reply to 348652
C-Octothorpe:
Mr. Clean:
C-Octothorpe:
...AFAIK...

I've been coming here long enough...I won't assume you know anything.


Wow, did you come up with that razor sharp retort all by yourself?

He's right. What you know would fit in a thimble, and still have room left over for an arthritic granny-pointer.

Re: Error-prone Errors

2011-06-01 14:16 • by C-Octothorpe
348655 in reply to 348654
yaki mando:
C-Octothorpe:
Mr. Clean:
C-Octothorpe:
...AFAIK...

I've been coming here long enough...I won't assume you know anything.


Wow, did you come up with that razor sharp retort all by yourself?

He's right. What you know would fit in a thimble, and still have room left over for an arthritic granny-pointer.


I love sock puppets!

What exactly is your contribution other than copy-pasting "disses"?

Re: Error-prone Errors

2011-06-01 14:17 • by Richard Weede (unregistered)
348656 in reply to 348652
C-Octothorpe:
Mr. Clean:
C-Octothorpe:
...AFAIK...

I've been coming here long enough...I won't assume you know anything.


Wow, did you come up with that razor-sharp retort all by yourself?


Actually, your comment was a retort. Mr. Clean's comment was an unsolicited observation.

Re: Error-prone Errors

2011-06-01 14:19 • by SenTree
348657 in reply to 348648
Dazed:
TheCPUWizard:

I did something similar (almost 30 years ago) but it was "Sparklers" and Smoke....startled the hell out of the people around when the PC loked like a 4th of july [USA holiday] celebration.

Yeah, like there were PC's around almost 30 years ago.

...

...

Hell!! It really was almost 30 years ago! You've just ruined my weekend (and it's only Wednesday.)


You beat me to it! Anybody else feeling really old?

Re: Error-prone Errors

2011-06-01 14:20 • by C-Octothorpe
348658 in reply to 348656
Richard Weede:
C-Octothorpe:
Mr. Clean:
C-Octothorpe:
...AFAIK...

I've been coming here long enough...I won't assume you know anything.


Wow, did you come up with that razor-sharp retort all by yourself?


Actually, your comment was a retort. Mr. Clean's comment was an unsolicited observation.



I know that, but it didn't have the same ring to it.

frits...

Re: Error-prone Errors

2011-06-01 14:24 • by pitchingchris
348659 in reply to 348640
Ralph:
Oik:
...Turns out he'd completed a whole MCSE course and got a good pass without ever actually touching a computer.
MCSE == Must Call Somebody Experienced

But you knew that, right?


I thought the tests were computerized ?

Re: Error-prone Errors

2011-06-01 14:27 • by Pot Sticker Korean Style (unregistered)
348660 in reply to 348655
C-Octothorpe:
What exactly is your contribution other than copy-pasting "disses"?


That was no copy and paste. Hopefully my contribution will be to convince you to settle down with the dozens of "Thank You, Professor Obvious" comments a day you post.
« PrevPage 1 | Page 2 | Page 3Next »

Add Comment