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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Stored Procedure Question

Re: Stored Procedure Question

From: Marc <langkamp_at_mailcity.com>
Date: Thu, 27 Sep 2001 16:14:28 +0200
Message-ID: <3bb33423$1@gaspra.oss.akzonobel.nl>


In your exception handling you could use utl_file to write messages to file before or after you have rollbacked. Another way is using an error table where you write your messages after having rollbacked.

something like this:

BEGIN <block_x>
debug_message := 'block_x';
 ....
EXCEPTION
  when others then

     ROLLBACK;
     insert into error_table values(debug_message);
     commit;
     RAISE;

END; Hth

Marc

"Matthew A. Givens" <m3corps_at_earthlink.net> wrote in message news:MH6s7.13792$W83.1379671_at_newsread2.prod.itd.earthlink.net...
> We're using Oracle stored procedures, and we use exception handlers so we
> can rollback in case of errors. The problem is that the stored procedure
> name and row number where the error occurred is always the exception
handler
> of the uppermost stored procedure. Is there a way we can keep the ability
> to rollback on database error but have the location of the database error
> correctly reported?
>
> Matthew A. Givens
>
>
Received on Thu Sep 27 2001 - 09:14:28 CDT

Original text of this message

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