Re:Why Java exceptions are slow (and Common Lisp conditions ...
by jwilliams on Saturday January 17, 2009 @11:41PM
(#439023)
An exception may not necessarily be an exceptional condition - e.g. Cannot parse integer, cannot open file might legitimately occur in code. In my APIs I usually try and make a very strong distinction between Exceptions and "Alternate Paths".
The thing is, many languages and APIs use the same mechanism for both - or at most offer checked and unchecked varieties.
For me, there is a big difference between an exception that the client can and can't remediate - e.g. "file not found" as opposed to "database down".
The thing is, many languages and APIs use the same mechanism for both - or at most offer checked and unchecked varieties.
For me, there is a big difference between an exception that the client can and can't remediate - e.g. "file not found" as opposed to "database down".