Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle For Fun

Re: Oracle For Fun

From: Tony <andrewst_at_onetel.net.uk>
Date: 1 Feb 2004 06:59:20 -0800
Message-ID: <c0e3f26e.0402010659.660882a8@posting.google.com>


Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1075568670.136040_at_yasure>...
> 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 tend to the opposite view: some people put too much error handling
> > in their code, sometimes resulting in unwanted behaviour. Without
> > explicit error handling, the worst that happens is you get a terse
> > error message; with bad error handling, you may never know there was
> > an error.
>
> 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.

Possibly. I find I tend to agree with Tom Kyte's take on exception handling, for example here:

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1939254308449 Received on Sun Feb 01 2004 - 08:59:20 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US