When a stored Java class hits and unhandled exception, what is the best way to get the full stack trace back to PL/SQL for proper logging?
During preliminary tests of my class, I hit a NullPointer, which Oracle displayed as an unhandled Java Exception. The only info I had was that it was a NullPointer - I get no hint as to where it is in the code.
Obviously I should be able to avoid most exceptions with rigorous validation of the client-provided data and unit tests, but in the event something happens?
I was thinking of catching exceptions, storing their stacktrace in an array and returning that array to PLSQL... but I'd rather avoid the need to manage all these additional return values.
There is most definitely already something on that, unfortunately my Google-fu has failed me...