[Helma-user] JS-only stack traces
Hannes Wallnoefer
hannesw at gmail.com
Thu Dec 7 13:20:59 CET 2006
As it turns out, this solution didn't work with Rhino interpreted
mode. To make it work reliantly, I had to patch Rhino:
https://bugzilla.mozilla.org/show_bug.cgi?id=363058
This means no backport to helma_1_5. IMO this isn't a big deal since
1) it's just an enhancement (although a nice one), and
2) 1.6 is ready and should be better than 1.5.* in almost every aspect
anyway (i.e. there shouldn't be any reason not to update to 1.6).
hannes
2006/12/7, Hannes Wallnoefer <hannesw at gmail.com>:
> 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