IsolateTerminatedException


public class IsolateTerminatedException extends JavaScriptException

Known direct subclasses
MemoryLimitExceededException

Indicates that a JavaScriptIsolate's evaluation failed due to the isolate exceeding its heap size limit.

SandboxDeadException

Exception thrown when evaluation is terminated due the JavaScriptSandbox being dead.


Exception produced when evaluation is terminated due to the JavaScriptIsolate being closed or due to some crash.

Calling close will cause this exception to be produced for all previously requested but pending evaluations.

If an isolate has crashed (but not been closed), subsequently requested evaluations will fail immediately with an IsolateTerminatedException (or a subclass) consistent with that used for evaluations submitted before the crash.

Note that this exception will not be produced if the isolate has been explicitly closed before a call to evaluateJavaScriptAsync, which will instead immediately throw an IllegalStateException (and not asynchronously via a future). This applies even if the isolate was closed following a crash.

Do not attempt to parse the information in this exception's message as it may change between JavaScriptEngine versions.

Note that it is possible for an isolate to crash outside of submitted evaluations, in which case an IsolateTerminatedException may not be observed. Consider instead using addOnTerminatedCallback if you need to reliably or immediately detect isolate crashes rather than evaluation failures.

Summary

Inherited methods

From java.lang.Throwable
synchronized final void
synchronized Throwable
synchronized Throwable
String
String
StackTraceElement[]
synchronized final Throwable[]
synchronized Throwable
void
void
setStackTrace(StackTraceElement[] stackTrace)
String

Public constructors

IsolateTerminatedException

Added in 1.0.0-beta01
public IsolateTerminatedException()

IsolateTerminatedException

Added in 1.0.0-beta01
public IsolateTerminatedException(@NonNull String message)