Click here to Skip to main content
15,914,066 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.

 
GeneralRe: Gawd, I hate Sony right now... Pin
Brisingr Aerowing29-Jun-16 9:57
professionalBrisingr Aerowing29-Jun-16 9:57 
GeneralRe: Gawd, I hate Sony right now... Pin
Rajesh R Subramanian29-Jun-16 17:49
professionalRajesh R Subramanian29-Jun-16 17:49 
QuestionON ERROR RESUME NEXT Pin
DaveAuld29-Jun-16 5:38
professionalDaveAuld29-Jun-16 5:38 
AnswerRe: ON ERROR RESUME NEXT Pin
jeron129-Jun-16 5:41
jeron129-Jun-16 5:41 
AnswerRe: ON ERROR RESUME NEXT Pin
den2k8829-Jun-16 5:44
professionalden2k8829-Jun-16 5:44 
GeneralRe: ON ERROR RESUME NEXT Pin
Sander Rossel29-Jun-16 21:18
professionalSander Rossel29-Jun-16 21:18 
GeneralRe: ON ERROR RESUME NEXT Pin
den2k8829-Jun-16 21:28
professionalden2k8829-Jun-16 21:28 
GeneralRe: ON ERROR RESUME NEXT Pin
Sander Rossel29-Jun-16 21:41
professionalSander Rossel29-Jun-16 21:41 
Most TrySomething (like TryParse) methods swallow exceptions if you don't check for the return value.
The if-statement can be just as harmful. Take those huge nested if-else branches. Impossible to test, impossible to change (without breaking everything).
So we replace the if-statements with switch/case-statements, same thing happens.
We need to loop through some collection, but it's kind of recursive, and now some programmer uses foreach foreach foreach... (yeah, I've seen it happen).
In SQL Server when an exception occurs it's more or less swallowed UNLESS you use try-catch (how many programmers know that?).

So I now shouldn't use catch, TryParse, if, switch/case, foreach, and SQL Server Smile | :)
Well, I agree ON ERROR RESUME NEXT is the most useless of them all Smile | :)
Read my (free) ebook Object-Oriented Programming in C# Succinctly.
Visit my blog at Sander's bits - Writing the code you need.
Or read my articles here on CodeProject.
Simplicity is prerequisite for reliability.
— Edsger W. Dijkstra
Regards,
Sander

GeneralRe: ON ERROR RESUME NEXT Pin
den2k8829-Jun-16 21:58
professionalden2k8829-Jun-16 21:58 
GeneralRe: ON ERROR RESUME NEXT Pin
firegryphon30-Jun-16 7:42
firegryphon30-Jun-16 7:42 
GeneralRe: ON ERROR RESUME NEXT Pin
obermd30-Jun-16 16:57
obermd30-Jun-16 16:57 
GeneralRe: ON ERROR RESUME NEXT Pin
SeattleC++30-Jun-16 10:28
SeattleC++30-Jun-16 10:28 
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 
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 

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.