How to log line number alongwith SQLCODE and SQLERRM?
554899Dec 31 2008 — edited Jan 5 2009
It is suggested (e.g. Tom Kyte advocates this) that the following is a good way to implement WHEN OTHERS clause...
{color:#800080}when others
then
log_error( ...... ); -- log error is an autonomous transaction
RAISE;
end;{color}
...if I use it this way, actual line number where error occurred is not revealed.
What is the way I can log actual code-line-number along with SQLCODE and SQLERRM in a log table.
Also, I need to throw the same to the client. Using RAISE throws the line number of RAISE.
Thanks,
Sam