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: help with exceptions please

Re: help with exceptions please

From: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 23 Sep 2007 15:54:02 -0700
Message-ID: <1190588034.202208@bubbleator.drizzle.com>


jgarfield_at_earthlink.net wrote:

> RAISE_APPLICATION_ERROR(error_number, error_message [, keep_errors])
>
> since they have no name, there is no way one could catch them using:
> EXEPTION
> WHEN error_name THEN
>
> so there's nothing you can do about them.

The intent of RAISE_APPLICATION_ERROR is not to trap them it is to RAISE them as in send them to the front-end application. This syntax is most commonly found in an exception block.

> (by the way, why would one want to keep_errors or not keep_errors
> here?)

Don't get the point of your question.

> Also, you can associate an oracle error but not a custom application
> error (#3 above) with an exception name using this pragma:
>
> EXCEPTION_INIT(e_child_exists, -1234);
>
> These now have a NAME and a NUMBER, and the MESSAGE already assigned
> to that number.

Again I don't get the point of your question.

> is this an accurate description?

Reasonably so. You can find working demos of all of these at: http://www.psoug.org/reference/exception_handling.html

For robust application error handling research these:

dbms_utility.format_call_stack
dbms_utility.format_error_backtrace
dbms_utility.format_error_stack

You will find demos of their useage at:
http://www.psoug.org/reference/dbms_utility.html

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sun Sep 23 2007 - 17:54:02 CDT

Original text of this message

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