Re: Readability of exception handling
Alan Baljeu <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
I agree with everything Richard writes, *except* the preamble: From: Richard A. O'Keefe <[email protected]> >Exception handling in any programming language is paradoxical. >You need to wrap an exception handler about code <<C>> >because you do not trust <<C>> to work properly. >But on the other hand, you *DO* trust <<C>> to do so >very little damage to its environment that it is safe >to continue. I believe it is best to consider the exceptions as *part* of "working properly". I trust the code, and I understand there are situations beyond the usual success/failure modes that need handling. (Of course I may be overly optimistic in my level of trust, but code can equally screw up without throwing exceptions.)