Display Line number where exception raise [message #496286] |
Fri, 25 February 2011 16:05 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
balji_dxb
Messages: 37 Registered: October 2007
|
Member |
|
|
We have Forms 10g for our application.
When i raise a exception in a procedure / trigger, i want to show the line number where the exception happened. is there any builtin to show that.
For eg
Exception when others
message('Error in this procedure');
raise;
I want the above exception to raise with line number also. How do i do it. I need some built in procedure in forms.
Please suggest
|
|
|
|
Re: Display Line number where exception raise [message #496424 is a reply to message #496288] |
Mon, 28 February 2011 03:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13964 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
DBMS_UTILITY.FORMAT_ERROR_STACK may help - can't try it my self at the moment.
However I think you may be out of luck. Procedures in the DB provide line numbers when they error but I'm not convinced procedures/triggers in forms can do that.
|
|
|
|
Re: Display Line number where exception raise [message #496438 is a reply to message #496434] |
Mon, 28 February 2011 04:29 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13964 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
You won't. Forms doesn't by default display line numbers of errors unless they came from DB procedures. You can write procedures/functions and triggers that are local to the form but they don't give line numbers when they error. I'm not convinced they ever can but can't check as I don't have a working forms installation.
|
|
|
Re: Display Line number where exception raise [message #496512 is a reply to message #496438] |
Mon, 28 February 2011 12:08 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
balji_dxb
Messages: 37 Registered: October 2007
|
Member |
|
|
@cookiemonster: DBMS_UTILITY.FORMAT_ERROR_STACK is only for database, but i need it in forms. i am using forms 10g. My assumption is when we compile a form and if there is some syntax error then forms gives the line number, similarly shouldn't have a built in to read the line number?.
|
|
|
|
|
Re: Display Line number where exception raise [message #496522 is a reply to message #496512] |
Mon, 28 February 2011 14:09 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13964 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
balji_dxb wrote on Mon, 28 February 2011 18:08@cookiemonster: DBMS_UTILITY.FORMAT_ERROR_STACK is only for database, but i need it in forms. i am using forms 10g. My assumption is when we compile a form and if there is some syntax error then forms gives the line number, similarly shouldn't have a built in to read the line number?.
You would have thought there would be, but I'm not aware of one. Maybe someone else knows.
|
|
|
|
Re: Display Line number where exception raise [message #496698 is a reply to message #496683] |
Wed, 02 March 2011 00:09 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I'd say that running the form in debug mode is a simpler way to achieve the same. OK, there was exception. You know which program unit it was. Set a breakpoint in there, run in debug mode. Most of the times it takes a few clicks to narrow the problem.
|
|
|