Class JSException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.oracle.truffle.api.exception.AbstractTruffleException
com.oracle.truffle.js.runtime.GraalJSException
com.oracle.truffle.js.runtime.JSException
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.js.runtime.GraalJSException
GraalJSException.IsIdenticalOrUndefined, GraalJSException.JSStackTraceElement -
Field Summary
Fields inherited from class com.oracle.truffle.api.exception.AbstractTruffleException
UNLIMITED_STACK_TRACE -
Method Summary
Modifier and TypeMethodDescriptionstatic JSExceptioncreate(JSErrorType type, String message) static JSExceptioncreate(JSErrorType type, String message, com.oracle.truffle.api.nodes.Node originatingNode) static JSExceptioncreate(JSErrorType type, String message, com.oracle.truffle.api.nodes.Node originatingNode, JSDynamicObject exceptionObj, JSRealm realm) static JSExceptioncreate(JSErrorType type, String message, com.oracle.truffle.api.source.SourceSection sourceLocation, boolean isIncompleteSource) static JSExceptioncreate(JSErrorType type, String message, JSDynamicObject exceptionObj, JSRealm realm) static JSExceptioncreate(JSErrorType type, String message, Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode) static JSExceptioncreate(JSErrorType type, String message, Throwable cause, com.oracle.truffle.api.source.SourceSection sourceLocation, boolean isIncompleteSource) static JSExceptioncreateCapture(JSErrorType type, String message, JSDynamicObject exceptionObj, JSRealm realm) static JSExceptioncreateCapture(JSErrorType type, String message, JSDynamicObject exceptionObj, JSRealm realm, int stackTraceLimit, JSDynamicObject skipFramesUpTo, boolean customSkip) static voidEager access to the ErrorObject.Could still be null due to lazy initialization.com.oracle.truffle.api.interop.ExceptionTypegetMembers(boolean internal, com.oracle.truffle.api.interop.InteropLibrary delegateLib) getMetaObject(com.oracle.truffle.api.interop.InteropLibrary delegateLib) getRealm()static intgetStackTraceLimit(JSRealm realm) booleanhasMemberReadSideEffects(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) booleanbooleanhasMemberWriteSideEffects(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) booleanhasMetaObject(com.oracle.truffle.api.interop.InteropLibrary delegateLib) invokeMember(String key, Object[] args, com.oracle.truffle.api.interop.InteropLibrary delegateLib) booleanbooleanisMemberInsertable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) booleanisMemberInvocable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) booleanisMemberModifiable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) booleanisMemberReadable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) booleanisMemberRemovable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) readMember(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) voidremoveMember(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) voidsetErrorObject(JSDynamicObject exceptionObj) voidwriteMember(String key, Object value, com.oracle.truffle.api.interop.InteropLibrary delegateLib) Methods inherited from class com.oracle.truffle.js.runtime.GraalJSException
fillInStackTrace, fillInStackTrace, fillInStackTrace, getJSStackTrace, getJSStackTrace, getJSStackTrace, getLanguage, getSourceLocationInterop, hasLanguage, hasSourceLocation, identityHashCode, printJSStackTrace, printJSStackTrace, setJSStackTrace, toDisplayStringMethods inherited from class com.oracle.truffle.api.exception.AbstractTruffleException
fillInStackTrace, getCause, getLocation, getStackTraceElementLimitMethods inherited from class java.lang.Throwable
addSuppressed, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
createCapture
public static JSException createCapture(JSErrorType type, String message, JSDynamicObject exceptionObj, JSRealm realm, int stackTraceLimit, JSDynamicObject skipFramesUpTo, boolean customSkip) -
createCapture
public static JSException createCapture(JSErrorType type, String message, JSDynamicObject exceptionObj, JSRealm realm) -
create
public static JSException create(JSErrorType type, String message, JSDynamicObject exceptionObj, JSRealm realm) -
create
public static JSException create(JSErrorType type, String message, com.oracle.truffle.api.nodes.Node originatingNode, JSDynamicObject exceptionObj, JSRealm realm) -
create
-
create
public static JSException create(JSErrorType type, String message, com.oracle.truffle.api.nodes.Node originatingNode) -
create
public static JSException create(JSErrorType type, String message, Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode) -
create
public static JSException create(JSErrorType type, String message, com.oracle.truffle.api.source.SourceSection sourceLocation, boolean isIncompleteSource) -
create
public static JSException create(JSErrorType type, String message, Throwable cause, com.oracle.truffle.api.source.SourceSection sourceLocation, boolean isIncompleteSource) -
getStackTraceLimit
-
getMessage
- Overrides:
getMessagein classThrowable
-
getRawMessage
-
getErrorType
-
getErrorObjectLazy
Description copied from class:GraalJSExceptionCould still be null due to lazy initialization.- Specified by:
getErrorObjectLazyin classGraalJSException
-
setErrorObject
-
getErrorObject
Description copied from class:GraalJSExceptionEager access to the ErrorObject. Use only if you must get a non-null error object.- Specified by:
getErrorObjectin classGraalJSException
-
getRealm
-
getExceptionType
public com.oracle.truffle.api.interop.ExceptionType getExceptionType() -
isExceptionIncompleteSource
public boolean isExceptionIncompleteSource() -
hasMembers
public boolean hasMembers() -
getMembers
public Object getMembers(boolean internal, com.oracle.truffle.api.interop.InteropLibrary delegateLib) throws com.oracle.truffle.api.interop.UnsupportedMessageException - Throws:
com.oracle.truffle.api.interop.UnsupportedMessageException
-
isMemberReadable
public boolean isMemberReadable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) -
isMemberModifiable
public boolean isMemberModifiable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) -
isMemberInsertable
public boolean isMemberInsertable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) -
isMemberRemovable
public boolean isMemberRemovable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) -
isMemberInvocable
public boolean isMemberInvocable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) -
hasMemberReadSideEffects
public boolean hasMemberReadSideEffects(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) -
hasMemberWriteSideEffects
public boolean hasMemberWriteSideEffects(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) -
readMember
public Object readMember(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) throws com.oracle.truffle.api.interop.UnknownIdentifierException, com.oracle.truffle.api.interop.UnsupportedMessageException - Throws:
com.oracle.truffle.api.interop.UnknownIdentifierExceptioncom.oracle.truffle.api.interop.UnsupportedMessageException
-
writeMember
public void writeMember(String key, Object value, com.oracle.truffle.api.interop.InteropLibrary delegateLib) throws com.oracle.truffle.api.interop.UnsupportedMessageException, com.oracle.truffle.api.interop.UnknownIdentifierException, com.oracle.truffle.api.interop.UnsupportedTypeException - Throws:
com.oracle.truffle.api.interop.UnsupportedMessageExceptioncom.oracle.truffle.api.interop.UnknownIdentifierExceptioncom.oracle.truffle.api.interop.UnsupportedTypeException
-
removeMember
public void removeMember(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib) throws com.oracle.truffle.api.interop.UnsupportedMessageException, com.oracle.truffle.api.interop.UnknownIdentifierException - Throws:
com.oracle.truffle.api.interop.UnsupportedMessageExceptioncom.oracle.truffle.api.interop.UnknownIdentifierException
-
invokeMember
public Object invokeMember(String key, Object[] args, com.oracle.truffle.api.interop.InteropLibrary delegateLib) throws com.oracle.truffle.api.interop.UnsupportedMessageException, com.oracle.truffle.api.interop.UnknownIdentifierException, com.oracle.truffle.api.interop.ArityException, com.oracle.truffle.api.interop.UnsupportedTypeException - Throws:
com.oracle.truffle.api.interop.UnsupportedMessageExceptioncom.oracle.truffle.api.interop.UnknownIdentifierExceptioncom.oracle.truffle.api.interop.ArityExceptioncom.oracle.truffle.api.interop.UnsupportedTypeException
-
hasMetaObject
public boolean hasMetaObject(com.oracle.truffle.api.interop.InteropLibrary delegateLib) -
getMetaObject
public Object getMetaObject(com.oracle.truffle.api.interop.InteropLibrary delegateLib) throws com.oracle.truffle.api.interop.UnsupportedMessageException - Throws:
com.oracle.truffle.api.interop.UnsupportedMessageException
-
ensureInitialized
- Throws:
ClassNotFoundException
-