Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle For Fun
Tony wrote:
> "Niall Litchfield" <niall.litchfield_at_dial.pipex.com> wrote in message news:<401ae429$0$10057$cc9e4d1f_at_news.dial.pipex.com>...
>
>>"Tony" <andrewst_at_onetel.net.uk> wrote in message >>news:c0e3f26e.0401301236.2b11876a_at_posting.google.com... >> >>>Why would a production environment require redundant error handling >>>and variable declarations? ;o) >> >>Variable declarations for readability essentially. >>A do nothing error handler for when the code gets changed to do something >>that might actually throw errors. People always exclude error handling from >>their code. It is almost always a mistake.
I think you're taking a bit too much of a "position". Lets look at this from a different perspective. Is there any excuse for putting any code in a database that does not have an exception handler?
I can think of only one ... a procedure that logs errors in which case you want the app to blow up if it ever fails because its failure would mean that errors are not being logged.
Having established, I hope, that there is only a few very rare cases where an exception handler isn't required ... the question of what constitutes too much or too little becomes academic.
The amount of exeption handling should be complete enough to trap all possible errors, log them if appropriate, and either continue processing or exit gracefully.
But from my experience ... I've seen thousands of cases of none ... never a case of too much. Your mileage may vary.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Sat Jan 31 2004 - 11:05:30 CST