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: Reraising exceptions

Re: Reraising exceptions

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Sat, 03 Apr 1999 23:25:50 GMT
Message-ID: <371395bf.4563500@netnews.worldnet.att.net>


Interesting question. I believe the INSERT should take place, but I also notice that you don't COMMIT. You do raise the exception to the next level. If the calling routine sees the error and does a rollback, then your insert will be undone.

regards,

Jonathan

On Fri, 02 Apr 1999 07:38:37 -0800, "Charles R. Conti" <crconti_at_ix.netcom.com> wrote:

>Will the insert take place in this piece of code
>
>
>DECLARE
> err_num NUMBER;
> err_msg VARCHAR2(100);
>BEGIN
> ...
>EXCEPTION
> ...
> WHEN OTHERS THEN
> err_num := SQLCODE;
> err_msg := SUBSTR(SQLERRM, 1, 100);
> INSERT INTO errors VALUES (err_num, err_msg);
>
> RAISE; /* or RAISE_APPLICATION_ERROR */
>END;
>
>
>
Received on Sat Apr 03 1999 - 17:25:50 CST

Original text of this message

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