Catching JVM exceptions
Attila Szegedi
attila.szegedi at oracle.com
Mon Dec 30 02:37:07 PST 2013
We don't wrap them initially, so "e" can be a java exception; catch(x if x instanceof java.io.FileNotFoundException) should work.
On Dec 30, 2013, at 7:24 AM, Tal Liron <tal.liron at threecrickets.com> wrote:
> How do you catch JVM exceptions in Nashorn? This is how it works in Rhino:
>
> try {
> ...
> }
> catch (x if x.javaException instanceof java.io.FileNotFoundException) {
> }
More information about the nashorn-dev
mailing list