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: Exception - Exit a Stored Program

Re: Exception - Exit a Stored Program

From: <karsten_schmidt8891_at_my-deja.com>
Date: Mon, 25 Oct 1999 14:56:57 GMT
Message-ID: <7v1r3n$6u0$1@nnrp1.deja.com>


Hi,

which languague is the calling program in ? there has got to be a status-check for calls to the database. how doy you handle other sql-errors ? (say ORA-0001 - unique index violated)

you handle exceptions exactly the same way, they show up as ORA-20000, or whatever error id you use in raise_application_error()

make sure, you do not have an when_others exception handler that hides the problem.
in general, you should only catch exceptions you want to treat as success.
If you need when_others to do some cleanup, you should re-raise or set a status flag to indicate the error.

Karsten

In article <38107381.156969984_at_news.pwgsc.gc.ca>,   NeedaHoliday wrote:
> UPDATE -
>
> RAISE_APPLICATION_ERROR works fine. THe problem is the calling
> program doesn't know that the called program has encountered an error.
>
> Is there a quick way to identify to the calling program that an
> exception has occurred. I was going to use a parameter exception
> indicator to do this. Any better alternatives.
>
> Thanks,
>
> Jim
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Oct 25 1999 - 09:56:57 CDT

Original text of this message

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