- 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
You sad, sad little man (Man? Ha hah ah ah ha.)
First you're all "I'll pop a cap in dat dere ass", now it's "Well, if he leaves then... um..."
In real life you'd help the thief carry your TV to his car, then go hide under your bed until someone lures you out with your favorite teddy bear.
PSA: "ITGs in my WTF GoTo thread? It's more likely than you think! Mock them now, and help contain the spread of this moronic disability! Call '555 GOTOWTF' for your free information kit today!"
Admin
Except that in Try Catch you need to check the error type:
Ah, but we forgot to disable error handling! After all, errors can occur within the catch or finally blocks:
And if we want an actual finally block, we need to allow for returning from the procedure:
And do you know what the rules are for jumping in and out of loops in VB? How do you handle, e.g. a break statement in a catch "block"? What about the rules for other structures, like Select statements or conditionals?
The problem with 'goto' is not that dumb programmers make spaghetti code, it's that programmers writing boilerplate makes spaghetti code.
The On Error approach to exception handling requires a ton of very tricky boilerplate, and even if you don't screw it up, it won't be readable.
Admin
Wow, for the record, the original submission had much better grammar.
Admin