Home » Developer & Programmer » Forms » Reg exception block
Reg exception block [message #82354] Tue, 20 May 2003 08:19 Go to next message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi,
Can anyone help what the following piece of code does?
WHEN OTHERS THEN
MESSAGE(sqlerrm);
PAUSE;
FOR i IN 1 .. tool_err.nerrors LOOP
MESSAGE(tool_err.message);
PAUSE;
tool_err.pop;
END LOOP;

Thanks
~V~
Re: Reg exception block [message #82357 is a reply to message #82354] Wed, 21 May 2003 01:52 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Whenever your PL/SQL block encounters an error, it will display the SQLERRM (last error message - it's a built-in) and wait for the user to acknowledge. Then it will loop through the tool_err ( an oracle provided package) messages. The tool_err package contains the error stack. You're code is not valid though. The line
MESSAGE(tool_err.message);
should in fact read
MESSAGE(tool_err.message<B><FONT COLOR=RED>(i-1)</FONT></B>);
.

Find out what Oracle has to say about tool_err in the Forms Help.

MHE
Previous Topic: about reports
Next Topic: data and forms
Goto Forum:
  


Current Time: Fri Mar 29 10:49:40 CDT 2024