Skip to main content

Timeline for Is it ok to use goto in catch?

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Jun 11, 2014 at 23:51 history edited Jamal CC BY-SA 3.0
deleted 10 characters in body
Nov 15, 2012 at 18:07 history edited sepp2k CC BY-SA 3.0
Removed link to user's blog as it didn't have anything to do with the answer.
Nov 15, 2012 at 17:25 comment added Bobson @ANeves - goto case is a perfectly legitimate use of goto. Getting out of a deep loop should be refactored so that you can use a return statement instead, if possible.
Nov 15, 2012 at 11:12 comment added Jens Mühlenhoff @ANeves +1 Using a goto once for a specific situation is "ok", but I personally try to find other solutions (exceptions, recursion, refactoring, etc.) first.
Nov 15, 2012 at 9:28 comment added ANeves What about using goto inside switch, or to get out of deeply nested loops, is it also spaghetti code?
Nov 15, 2012 at 8:34 history answered Buddy James CC BY-SA 3.0