- 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
If we're going to nitpick the message should be "there was an error during the backup".
Admin
Well, you have to understand that "gotos are evil" because they can be used to violate the principles of structured programming. In that sense, it's kind of like banning baseball bats because bats can be used in dark alleys for evil things.
But...it is true that exceptions violate the principles of structured programming, as they were defined way back when. I've even raised that objection myself. But mostly, that depends again on how you use them, just like it depends on how you use goto. (Yes, Virginia, goto can be used to write structured programs.)
Nowadays, I boil it down to two issues: How the implementation works (good vs. evil) and how you (ab)use the features. Use the feature badly, and you will have a hole in your foot from where you shot yourself. Have an evil implementation, well, you can shoot yourself in the foot even if you try to do it right.
C++ implementation, at least the first iteration: Evil. Almost impossible to use it without shooting yourself in the foot. It might be better now, I know they've done changes, but I haven't used C++ for a while...
On the other hand, Java has a solid implementation. As noted above, some zealots might say, "All exceptions are evil," because, "structured programming." To them I say, "Get a good implementation," and "Who made structured programming a god?"
Admin
Makes sense so far...
The C++ folks have this more-or-less figured out, and have in the process figured out how resource deallocation and exception handling *should* interact, instead of dumping it on the programmer with a `finally` block. What makes you look to Java? Checked exceptions were a massive waste of their time and breath, and their rather tenacious grip on the infernal abomination known as `finally` makes them look oafish in this day and age.Admin
Well, I'm familiar with it. So? Does finally make it an evil implementation? No.
When I talk about the difference between "good" and "evil" here, I'm talking about the implementation in the language. A good language implementation is moderately safe to use, requiring a moderate level of stupidity and misuse to shoot self in foot. On the other hand, evil implementations, such as the original C++ exception structure, arrive with machine gun already firing at a high rate, and keeping yourself from being shot in the foot requires fancy footwork (too bad if your footwork isn't great).
By that standard, Java is a good implementation, even if it is sometimes annoying to use.
Admin
The entire time I've used C#, I've used GOTO exactly once. Situations where it's useful or makes things more readable are incredibly rare IMHO (but do come up).
Admin
I think that you're thinking of the mid-90s then...because I haven't seen any bullets flying out of C++ EH in the code I work on! (And this is using the MFC catch-by-pointer business, too.)
Admin
No argument there. But structure is possible with goto. I still have to write COBOL and, while my company permits it, it is restricted to the equivalent of a C "return" statement. (Which also violates the old rules of structured programming by the way.)
Even then, I avoid it as much as possible.
Admin
As a matter of fact, the last time I used C++ was ... the mid 90's.
I'm not up to date on the current implementation, but discussions I have seen indicate it is vastly improved.
Admin
Everyone knows the only propper error message is: > Something went wrong.
Admin
... standardized, yes. Significantly expanded, yes. Improved? Hmmmm.
Admin
Microsloth Outlack once gave me this error message: The action failed to complete. The action failed to complete.
That seems to me to be a pretty proper error message, too. Just think:
So I vote that "The action failed to complete. The action failed to complete." is a better message than "something went wrong;" I vote for Outlack!
Outlack! Outlack! Outlack! Outlack! Outlack! Outlack!
Admin
You seem angry about Outlook. Perhaps Lotus Notes would be more your thing.
Admin
Why would you think I focus on Outlack? I pick on everything Microsloth makes, equally. Outlack is a favorite yes, but there's also their patented Guess Wrong technology, which they offer in the form of their MAG/NET (Most Aggravating Guess/Not Ever Timesaving) user interfaces.
Drives me crazy every day. Surely Notes could not be worse, right?
Admin
Because you talked about Outlook and not other stuff?
Admin
I can only assume the many many people who routinely code this way merely have a deep-seated hate for sysadmins and regular users. At least with commercial code people can threaten to take their ball and go home if it looks too shitty; open source developers often actively resist and sometimes ban anyone who asks for simple things, like a decent error message.
And then they get all pissed and close reports from anyone posting that half-assed error.
Admin
Possible partial defense of the article: perhaps ErrorOccurredEventArgs has an overloaded constructor, one for each of the Exceptions types caught.
Admin
isn't that just pushing the WTF deeper?
Admin
No, you're doing what any senior enterprisy architect would do: abstract the WTF.
Admin
Admin
At least Outlack doesn't crash in DoDragDrop...
Admin
This guy has to be a joke account.
Admin
Metaphors are a barrier to coding discussion. Examples allow people to let you know if it's been improved or not; I for one have no fucking idea what you're complaining about :/
Admin
Slashdot is that way, thank you.
Admin
Don't. Some things are far more deserving of it than others.
Admin
But we wore 'em down.
Admin
I think this exception has been caught.
Something like,
currentUniverse = new Universe(currentUniverse.complexity * 2, currentUniverse.insanity * 2);
and we're left in the universe the garbage collector is disposing of.
Admin
Let's hope the backup process doesn't overwrite the only existing backup, and the cleanup doesn't wipe out all files of that backup.
Admin
That's true on several levels...
What fun would that be?
Admin
[quote=redwizard] What fun would that be? [/quote] Uttered hopes are sent to the Murphy module by default, and that comes up with bizarre ideas no human could ever dream of.