[Helma-user] JS-only stack traces
Hannes Wallnoefer
hannesw at gmail.com
Thu Dec 7 11:08:41 CET 2006
2006/12/7, Juerg Lehni <juerg at scratchdisk.com>:
> Out of curiosity: Did you subclass the StackTraceElement and
> overwrite its toString method?
I would have liked to do that, but StackTraceElement is declared
final, so I couldn't do this. What I did is to use
helma.scripting.ScriptingException, which was already thrown at the
place in question, but didn't do anything useful so far.
Unfortunately, I had to copy/adapt much of the stack trace printing
code form java.lang.Throwable in order to override it, because the
printStackTraceAsCause() methods are declared as private there.
http://adele.helma.org/source/viewcvs.cgi/helma/src/helma/scripting/ScriptingException.java.diff?r1=1.4&r2=1.5&cvsroot=hop
Except for that, I'm pretty happy and confident with the change,
especially because I was able to use an exception class which was
already there and make it do something really useful.
hannes
More information about the Helma-user
mailing list