How to get stack contents in an Exception stack trace
843810Jan 17 2006 — edited Jan 17 2006Hi
Currenty when an exception in thrown in a java class copiled with debug option we get line numbers in the stacktrace but we do not get the state of the stack.
How can I the details of the stack (i.e. values of all the local variables visible in that thread) ?
As information is available when we debug the application so I presume this information should be available but I do not know how to access it.
Obviously I would need to override this in my custom Exception as this feature is not provided by JAVA currently
I analyzed that the fillStacktrace() method is the most likely candidate but it has a native implementation in class Throwable hence was not able to get the details.
This would be a nice feature to have in future Java release