Home » SQL & PL/SQL » SQL & PL/SQL » raise_APPILICATION_ERROR
raise_APPILICATION_ERROR [message #224202] Tue, 13 March 2007 06:56 Go to next message
ddkdhar
Messages: 68
Registered: February 2007
Member

I WANT TO DISPLAY MESSAGE IN RAISE_APPILICATION_ERROR PROCEDURE
MORE THAN 2048 bytes long . I KNOW IT WILL PERMIT UPTO 2048 BYTE LONG.BUT I WANT TO RETURN ERROR MESSAGE MORE THAN 2048.HOW CAN I DO THIS IN PLSQL?
THANKS IN ADVANCE

[Updated on: Tue, 13 March 2007 06:57]

Report message to a moderator

Re: raise_APPILICATION_ERROR [message #224234 is a reply to message #224202] Tue, 13 March 2007 08:14 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
You can't.
Raise_Application_Error will take a maximum length of 2048 chrs.

You could use the optional 3rd parameter in R_A_A to put the error onto the error stack (rather than replacing the error stack) and use exception handlers to let you output multiple R_A_A errors:
SQL> begin
  2    begin
  3      raise_application_error(-20001,'Error message');
  4    exception
  5      when others then
  6        raise_application_Error(-20001,'More Error Message',true);
  7    end;
  8  end;
  9  /
begin
*
ERROR at line 1:
ORA-20001: More Error Message
ORA-06512: at line 6
ORA-20001: Error message
or you could log the error text in a log file, and heve the error message tell you where the data is.

I suspect though, that you need to ask yourself WHY you are trying to pass more than 2k of text back as an error message. Are you doing something iffy like trying to pass data around using the SQLERR value?
Previous Topic: Tunning Question
Next Topic: ORA-29278: SMTP transient error: 421 Service not available
Goto Forum:
  


Current Time: Wed Dec 07 22:22:17 CST 2016

Total time taken to generate the page: 0.10763 seconds