Why true argument is used in Raise_application_error? [message #244255] |
Tue, 12 June 2007 03:10 |
orafacjublu
Messages: 95 Registered: May 2006 Location: KOLKATA
|
Member |
|
|
From the oracle document I found that Raise_application_error can take a third argument TRUE/FALSE .If it is true then it gets into the error stack. Can anyone kindly elaborate me what exactly gets stored in the stack; whether the stack is a data-dictionary table or view ? pls clear. Kindly give me an example
of the real life application of using raise_application_error with the true argument eg. raise_application_error(-20000,message_text,TRUE)
|
|
|
|
Re: Why true argument is used in Raise_application_error? [message #244261 is a reply to message #244255] |
Tue, 12 June 2007 03:31 |
|
Michel Cadot
Messages: 68722 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
SQL> begin
2 raise_application_error (-20001,'First error');
3 exception
4 when others then
5 raise_application_error (-20002,'Second error',false);
6 end;
7 /
begin
*
ERROR at line 1:
ORA-20002: Second error
ORA-06512: at line 5
SQL> begin
2 raise_application_error (-20001,'First error');
3 exception
4 when others then
5 raise_application_error (-20002,'Second error',true);
6 end;
7 /
begin
*
ERROR at line 1:
ORA-20002: Second error
ORA-06512: at line 5
ORA-20001: First error
When FALSE, the second message REPLACE the first one.
When TRUE, the second message is ADDED to the first one.
Regards
Michel
|
|
|
|
|
|
|