Click here to Skip to main content
15,891,253 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: ON ERROR RESUME NEXT Pin
OriginalGriff29-Jun-16 5:45
mveOriginalGriff29-Jun-16 5:45 
GeneralRe: ON ERROR RESUME NEXT Pin
Gerry Schmitz30-Jun-16 6:49
mveGerry Schmitz30-Jun-16 6:49 
JokeRe: ON ERROR RESUME NEXT Pin
Ian Shlasko29-Jun-16 5:55
Ian Shlasko29-Jun-16 5:55 
JokeRe: ON ERROR RESUME NEXT Pin
Richard Deeming29-Jun-16 6:06
mveRichard Deeming29-Jun-16 6:06 
GeneralRe: ON ERROR RESUME NEXT Pin
jeron129-Jun-16 6:14
jeron129-Jun-16 6:14 
GeneralRe: ON ERROR RESUME NEXT Pin
Mark_Wallace29-Jun-16 11:10
Mark_Wallace29-Jun-16 11:10 
AnswerRe: ON ERROR RESUME NEXT Pin
Eddy Vluggen29-Jun-16 6:16
professionalEddy Vluggen29-Jun-16 6:16 
GeneralRe: ON ERROR RESUME NEXT Pin
Richard Deeming29-Jun-16 6:36
mveRichard Deeming29-Jun-16 6:36 
Not quite - the modern version would require wrapping every single statement in its own "Pokémon exception-handling" block.

Which would mean splitting all variable declarations from their assignments, since a variable declared inside a try block can't be used outside of that block.

Which would also mean giving every variable some sort of default value, either when they're declared, or in the empty catch block for the first line that assigns them.

And don't forget to update the properties of the global Err object, in case the user gave any thought to checking for errors on the following line, and didn't just let their code trundle on regardless and destroy the program state / database / computer / world.

Having worked with VBScript many years ago, where this was the only form of error handling allowed, it's an horrendous construct. Whoever came up with the idea deserves a good beating with the clue-bat.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: ON ERROR RESUME NEXT Pin
Eddy Vluggen29-Jun-16 6:53
professionalEddy Vluggen29-Jun-16 6:53 
GeneralRe: ON ERROR RESUME NEXT Pin
OriginalGriff29-Jun-16 8:00
mveOriginalGriff29-Jun-16 8:00 
GeneralRe: ON ERROR RESUME NEXT Pin
Mark_Wallace29-Jun-16 11:12
Mark_Wallace29-Jun-16 11:12 
GeneralRe: ON ERROR RESUME NEXT Pin
Stephen Hewitt29-Jun-16 6:42
Stephen Hewitt29-Jun-16 6:42 
GeneralRe: ON ERROR RESUME NEXT Pin
Larry Gibson30-Jun-16 4:42
Larry Gibson30-Jun-16 4:42 
GeneralRe: ON ERROR RESUME NEXT Pin
jediYL30-Jun-16 16:11
professionaljediYL30-Jun-16 16:11 
AnswerRe: ON ERROR RESUME NEXT Pin
stoneyowl229-Jun-16 6:18
stoneyowl229-Jun-16 6:18 
GeneralRe: ON ERROR RESUME NEXT Pin
Eddy Vluggen29-Jun-16 6:36
professionalEddy Vluggen29-Jun-16 6:36 
GeneralRe: ON ERROR RESUME NEXT Pin
Gary Wheeler29-Jun-16 7:36
Gary Wheeler29-Jun-16 7:36 
AnswerRe: ON ERROR RESUME NEXT Pin
Mark_Wallace29-Jun-16 7:07
Mark_Wallace29-Jun-16 7:07 
AnswerRe: ON ERROR RESUME NEXT Pin
kmoorevs29-Jun-16 7:10
kmoorevs29-Jun-16 7:10 
AnswerRe: ON ERROR RESUME NEXT Pin
CDP180229-Jun-16 7:16
CDP180229-Jun-16 7:16 
AnswerRe: ON ERROR RESUME NEXT Pin
Ryan Peden29-Jun-16 7:37
professionalRyan Peden29-Jun-16 7:37 
GeneralRe: ON ERROR RESUME NEXT Pin
Mark_Wallace29-Jun-16 11:29
Mark_Wallace29-Jun-16 11:29 
AnswerRe: ON ERROR RESUME NEXT Pin
ZurdoDev29-Jun-16 8:02
professionalZurdoDev29-Jun-16 8:02 
GeneralRe: ON ERROR RESUME NEXT Pin
Richard Deeming29-Jun-16 8:28
mveRichard Deeming29-Jun-16 8:28 
GeneralRe: ON ERROR RESUME NEXT Pin
Mark_Wallace29-Jun-16 11:14
Mark_Wallace29-Jun-16 11:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.