- 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
Addendum 2022-03-31 07:03: You know what else is Fubar? This comment system that strips out CRLF of posts.
Admin
It's the "no visible error allowed" doctrine, also called the "put the garbage into drawers instead of spreading it on the bed for everyone to see" pattern.
Admin
I'm not fond of logging every bleeding little detail (open a linux syslog or macos console to see how crap much you can log) because it makes logging useless, but not even logging in the case of a serious error, that's a new low.
Admin
This approach seems to be getting more and more traction instead of being beaten with a stick. The idea that any error is bad so just act like you don't have any.. ugh.
Admin
It's called "Markdown", and it's a whole WTF category unto itself.
Admin
But how do you know the REASON it's munged isn't the logging is broken so you CAN'T log. Oh, I guess, if you were a professional developer who knew WTF they were doing, you might catch THAT issue and handle it, then knowing logging isn't broken, log that it's FUBAR.
But that's not the way we roll. Bleep it. Ship it.
Admin
Markdown is what happens when, instead of a specification, you have a reference implementation.
Admin
Oooooohhhhh is that why everyone re-implements their own flavor?
Admin
You should at least log an error in such an case, because there could be other unexpected issues happening like an DB Connection timeout, a race condition, a dead lock scenario, an network connection time, a division by zero, etc.
Logging never hurts, if you use a proper framework the impact in such cases is not even worth mentioning but the value for potential bug tracking can be worth more than months of development hours.
Admin
I dunno..... Everybody here knows "Error Checking" is when the application verifies a distribution account that the user may have mistyped and "Exception" happens because of a bad array index, duplicate primary key, nonexistent object, invalid data type, or division by zero. While I agree that an empty catch is a WTF (especially when it is intentionally crafted to bypass a fubar), TRWTF here is that the program is known to throw exceptions and nothing was done to recover from it.
"Sorry, I can't divide the balance by zero monthly payments."
"Oh, that's OK - you just go right ahead and cut a check for $NaN"
Addendum 2022-03-31 10:20: EDIT: Yes, I know I described Data Validation, but my use of it here is because, if you typed a bad account, it will cause an error.
Admin
Perhaps the comment should have read
Addendum 2022-03-31 10:31: Damnit, there was a bug in my comment. should have read.
Admin
Is this what caused the British Post Office Scandal?
https://en.wikipedia.org/wiki/British_Post_Office_scandal
Admin
Having to work with the willfully ignorant and lazy is what drove me into retirement.
Admin
catch // Cthulhu here { }
Admin
catch { // me if you can }
Admin
Closely related to apps/websites that say nothing more than "something went wrong" on any failure, giving you (the end user) no chance of actually finding/fixing the problem.
Admin
I didn't mind the previous empty catch block in the logging routine but this is insane. The only acceptable reason for something like this is when it's a do-or-die type situation. You lit the rocket, it's orbit or bust. An empty catch block would have saved the first Ariane V launch--the fubared data was actually completely moot at that point. (The program was meant for use on the pad, not in flight.)
Admin
This makes sense to me, basically a top-level try-catch-do-nothing. Obviously it gets more in-depth that that with logging, logger failed so backup logger, that failed so retry pattern, that failed so events viewer, etcetcetc, that failed so do-nothing catch block. :)
Admin
Ensuring the output to the end-user is minimal and meaningless is a security thing.
Some (most?) of the time, an error on a website is something the end-user can do nothing about. The database being offline, or something missing is not something you can fix unless you are the admin or maintainer of the site - and those individuals hopefully have access to detailed logs that do say something more than “Something went wrong”.
When it’s a user-fixable error though, that’s when it’s scary. That would mean your input data can cause unexpected behaviour in the system… so it’s really important that the end-user doesn’t find out too much about what caused the problem, because that’s exactly the kind of information that can be used to find serious security vulnerabilities.
Unfortunately, that means it’s not even safe to hint to the user that this might or might not be something they can fix - because even knowing the issue might be fixable is enough for a criminal hacker to use to figure out if they’re on the right track for breaking into a system.
Once again, the criminal behaviour of a small subset of the population is responsible for the suffering the rest of us endure… this is why we can’t have nice things!
Admin
While it's correct that an "empty" catch block would have saved the launch in that case it's equally possible that an empty catch could lead to serious safety issues due to continued process after a critical error. So just because it would have helped in one case doesn't make this less a WTF.
Admin
You don't need the web or an app for that. Your ordinary home or office PC can already do it just fine: "Something happened. :( Your PC ran into a problem that it couldn't handle, and now it needs to restart."