Is it possible to throw a Java exception (i.e. an object that extends
java.lang.Exception) from Javascript and handle the exception in Java
code?

I am implementing an interface in my Javascript code, and would like
to throw an exception from a method in my Javascript code.

When I execute my Java code (which executes Javascript code that
throws an exception) I keep seeing a
java.lang.reflect.UndeclaredThrowableException caused by
java.security.PrivilegedActionException caused by
javax.script.ScriptException.

I'd like to see the exception that I threw from Javascript instead of
the UndeclaredThrowableException.

Here's my throw statement in Javascript:

throw new com.acme.AcmeRuntimeException();

Any help would be great. Thanks!

Ian
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to