- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
E is for Exception and that's good enough for me. OM NOM NOM!
Admin
I hate those pesky e's. I had to get rid of them all over my codebase too. It didn't do much for the application, but it builds a little faster now....
Admin
this is still dangerous code. To make it truly safe it needs a
Admin
+10. That's awesome!
Admin
All this talk about "e" is going to attract all of those discotheque-crazy Europeans from yesterday's comment thread.
Admin
It's the Bad Code Offsets you and your team buy each month that keep the Apache project running isn't it?
Admin
How about an extension method to teach these people what to do with exceptions? I use ex.Log(), which uses a static, configurable ErrorLog class to log the full stack trace and everything else to the EventLog, and emails the same to the developer.
Admin
Admin
What language is this? This wouldn't even compile in Java without the 'e'.
Admin
Oh, how I wish this story was fake... We were asked to do the same in our codebase; to remove all compilation warnings without changing behavior.
There is seemingly a market for software that behaves like a pack of rabid werewolves.
Admin
DoProcessReceipts() just looks like a long-ass 100+ line function that does SQL queries, array manipulation, and a ton of other operations that can be prone to all kinds of exceptions. I can't believe there isn't even a log entry for when something goes wrong.
Admin
Admin
It's C#, the 'joke' is that with the e you get a warning 'Variable e is declared but never used', so they removed it.
Admin
Fixed?
Admin
This is standard programming practice in Hyderabad
Admin
Admin
TRWTF is American labour laws.
Admin
Admin
No one reads the website from home?
Admin
Admin
Admin
No, he's serious, it's just that he's been 'Enterprised' (notice the use of a configurable log provider and extension methods).
Admin
Admin
... after calling office automation code! WIN!
Admin
The idea was that you get an error message, but none of the helpful information that was in the exception. The message box on a server has been covered.
Admin
That actually is better (at least there is something being outputted as opposed to the silent scream of a caught exception), but you'll still get the compiler warning.
Admin
Next time you bash e, get to know it first. Thanks.
Admin
Hooray for compliant code! 'Cause the non-compliant variety is just too much for me, you know.
Admin
Is that a concept from Lovecraft-Driven Development (LDD)?
Come to think of it, the majority of code seems to be based on primal terror.
Admin
Embarassingly enough, it eluded everybody that every error and exception would endure even after eliminating the pesky "e".
Admin
Admin
Some part of me wants to give you a high five... another part of me wants to smack you.
Admin
BUT, the point was not to fix the errors/exceptions, it was simply to remove the build warnings.
Admin
You mean the exception would still happen, but would still be swallowed by the empty catch, right? The way I read your comment was that it would bubble up...
Admin
If only we had 3 monthes... in France we have only 2. CA c'est le vrai WTF.
Admin
Helloooo NEWMAN
Admin
Admin
For instance, my exception logger class has an empty try catch around the Log method, "//because exception loggers should not throw exceptions".
Admin
But... but... but... who's going to log the loggers?!
Admin
Admin
Admin
I meant "better" as in "more ironic" but whatever.
Admin
And there's TRWTF - assuming developers using a language will write shite.
Admin
Um, ok. I think you almost the comment...
Admin
Admin
Did I mention the vampire's handwriting IME is so beautiful and perfect? No? Oh, well, it so totally is.
Admin
I use this pattern all the time in javascript. Maybe I'm looping through an array and want to do something (call methods, change properties) that only some of the elements have. I'm too lazy to inspect each one, so I'll just try and catch.
Admin
Admin
I realized that, but wasn't sure if you knew that your example (although technically wouldn't compile) was actually an improvement.
Anyway, excuse me while I reboot my sarcasm detector...
Admin
After all the times I've been ribbed on this site...