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 -> exception handler (caught twice?)

exception handler (caught twice?)

From: john kelly <johnt.kelly_at_worldnet.att.net>
Date: Thu, 24 Aug 2000 02:14:09 GMT
Message-ID: <RIOkORCGXfsgxaVPQBU1eiJ0jlb+@4ax.com>

 I've created a package that contains two procedures.  The first procedure is a looping program that calls the second procedure that does all the work.
 The problem that I have is in the second (called) procedure it tries to do a select * from x where xyz for update nowait.  If a lock is on this row an exception is thrown.  In the package body I created the following:  rec_inuse exception ;
 pragma exception_INIT (rec_inuse, -54);

 When the exception occurs I catch it, return a status to the calling program (indicating that I caught this condition, sleep and  then call me again).
 the problem is the calling program gets an exception also and since I do not have this one specifically in this procedure it go  to the WHEN OTHERS exception and sqlcode/sqlerrm report  "ORA-00054: resource busy and acquire with NOWAIT specified"  Caught twice? How do I handle this? Is this normal? I would have thought that since I caught it in the called program it would not generate an exception in any calling programs.

Any help would be greatly appreciated.

        John Received on Wed Aug 23 2000 - 21:14:09 CDT

Original text of this message

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