R
Richard Maher
Hi,
I've been doing a bit of Java Applet to JavaScript communication through
JSObject.call() recently and am having much success. But when it comes to
catching exceptions (in Java) that were thrown (in the JavaScript) I am not
having much success at all :-(
My try/catch(JSException e) block gets activated but the "e" seems to be
pretty useless when it comes to interrogating what went wrong. The
documentation says I should be able to get all sorts of JavaScript specific
info like error-string, line-no, and file-name but all I get is null. Look,
I'd settle for getMessage(), getWrappedThing().toString() or even
printStackTrace().
Can anyone please show me an example of an Applet trapping and deciphering a
JS exception?
Cheers Richard Maher
PS. The exceptions can be anything you like from "object is null or
undefined" to throw("A wobbly")
I've been doing a bit of Java Applet to JavaScript communication through
JSObject.call() recently and am having much success. But when it comes to
catching exceptions (in Java) that were thrown (in the JavaScript) I am not
having much success at all :-(
My try/catch(JSException e) block gets activated but the "e" seems to be
pretty useless when it comes to interrogating what went wrong. The
documentation says I should be able to get all sorts of JavaScript specific
info like error-string, line-no, and file-name but all I get is null. Look,
I'd settle for getMessage(), getWrappedThing().toString() or even
printStackTrace().
Can anyone please show me an example of an Applet trapping and deciphering a
JS exception?
Cheers Richard Maher
PS. The exceptions can be anything you like from "object is null or
undefined" to throw("A wobbly")