Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Exception - Exit a Stored Program
Thank you all for your responses. My problem was the way I raise the
exception. Once I used RAISE_APPLICATION_ERROR in the called program,
the calling program received control. My understanding was incorrect
as I thought I could let the called program raise an exception and
catch it in the calling program. My apologies to all for the
misconception.
Thanks for the help.
On Mon, 25 Oct 1999 14:56:57 GMT, karsten_schmidt8891_at_my-deja.com wrote:
>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 - 14:16:26 CDT
![]() |
![]() |