[tcljava-user] Getting a useful stack trace from a java exception returned from a method called in
Brought to you by:
mdejong
From: Jared H. <ho...@mo...> - 2008-10-14 15:41:30
|
Hi all, So I am using jacl in our java code a lot like glue to hold the various pieces of java code together. I write all of the simple stuff in tcl and all of the stuff that needs to go fast goes into java. So anyway, I'm sometimes debugging java code by calling it in jacl. My question is, how do I get a useful stack trace out of a method I call this way? I've tried catching the TclException that gets called and printing out it's stack trace, but it always ends at: tcl.lang.ReflectException at tcl.lang.JavaInvoke.call(JavaInvoke.java:328) ... I've looked in the code, and it looks like the call method is catching the InvocationTargetException and wrapping it in a ReflectException. This would be fine and I would just call "getThrowable" and print it's stack trace if ReflectException was public. Is there any reason this class needs to not be public? Is there maybe another way to get to this? I don't want to have to mess with wrapping every call in "java::call" when I can simply put a java call in my code. -Jared |