Forgot your password?

typodupeerror

Comment: Problem with Exceptions (Score 1) 536

by shawnhcorey (#42225921) Attached to: The Scourge of Error Handling
The biggest problem with exceptions is that they get thrown too far, changing them into comefroms (the opposite of a goto). And like gotos, they encourage spaghetti code. The best way to deal with them is to limit them to thrown exceptions only to their callers. That way, all exceptions become part of the subroutine's interface. Remember, for a programmer, out of sight is out of mind. If it's not part of the interface, it will be forgotten. For those who are interested, you can read my blog for details and an example.

There's no such thing as a free lunch. -- Milton Friendman

Working...