When given an Exception object in Java, is there any way to get (or infer) the instances involved in the stack trace of this exception? I know that StackTraceElement contains information about the classes involved, but what about the actual instances?
In case you're wondering, I'd like to use this in a Thread.UncaughtExceptionHandler that displays error dialogs. The plan is to figure out which JFrame produced the unhandled exception and set that as the parent (this would affect positioning of the dialog, modality (which window it blocks) etc).
Thanks.