public final class JSException extends GraalJSException
GraalJSException.IsIdenticalOrUndefined, GraalJSException.JSStackTraceElement| Modifier and Type | Method and Description |
|---|---|
static JSException |
create(JSErrorType type,
String message) |
static JSException |
create(JSErrorType type,
String message,
JSDynamicObject exceptionObj,
JSRealm realm) |
static JSException |
create(JSErrorType type,
String message,
com.oracle.truffle.api.nodes.Node originatingNode) |
static JSException |
create(JSErrorType type,
String message,
com.oracle.truffle.api.nodes.Node originatingNode,
JSDynamicObject exceptionObj,
JSRealm realm) |
static JSException |
create(JSErrorType type,
String message,
com.oracle.truffle.api.source.SourceSection sourceLocation,
boolean isIncompleteSource) |
static JSException |
create(JSErrorType type,
String message,
Throwable cause,
com.oracle.truffle.api.nodes.Node originatingNode) |
static JSException |
create(JSErrorType type,
String message,
Throwable cause,
com.oracle.truffle.api.source.SourceSection sourceLocation,
boolean isIncompleteSource) |
static JSException |
createCapture(JSErrorType type,
String message,
JSDynamicObject exceptionObj,
JSRealm realm) |
static JSException |
createCapture(JSErrorType type,
String message,
JSDynamicObject exceptionObj,
JSRealm realm,
int stackTraceLimit,
JSDynamicObject skipFramesUpTo,
boolean customSkip) |
static void |
ensureInitialized() |
Object |
getErrorObject()
Eager access to the ErrorObject.
|
JSDynamicObject |
getErrorObjectLazy()
Could still be null due to lazy initialization.
|
JSErrorType |
getErrorType() |
com.oracle.truffle.api.interop.ExceptionType |
getExceptionType() |
Object |
getMembers(boolean internal,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
String |
getMessage() |
Object |
getMetaObject(com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
String |
getRawMessage() |
JSRealm |
getRealm() |
static int |
getStackTraceLimit(JSRealm realm) |
boolean |
hasMemberReadSideEffects(String key,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
boolean |
hasMembers() |
boolean |
hasMemberWriteSideEffects(String key,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
boolean |
hasMetaObject(com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
Object |
invokeMember(String key,
Object[] args,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
boolean |
isExceptionIncompleteSource() |
boolean |
isMemberInsertable(String key,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
boolean |
isMemberInvocable(String key,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
boolean |
isMemberModifiable(String key,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
boolean |
isMemberReadable(String key,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
boolean |
isMemberRemovable(String key,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
Object |
readMember(String key,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
void |
removeMember(String key,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
void |
setErrorObject(JSDynamicObject exceptionObj) |
void |
writeMember(String key,
Object value,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
fillInStackTrace, fillInStackTrace, fillInStackTrace, getJSStackTrace, getJSStackTrace, getJSStackTrace, getLanguage, getSourceLocationInterop, hasLanguage, hasSourceLocation, identityHashCode, printJSStackTrace, printJSStackTrace, setJSStackTrace, toDisplayStringfillInStackTrace, getCause, getLocation, getStackTraceElementLimitaddSuppressed, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static JSException createCapture(JSErrorType type, String message, JSDynamicObject exceptionObj, JSRealm realm, int stackTraceLimit, JSDynamicObject skipFramesUpTo, boolean customSkip)
public static JSException createCapture(JSErrorType type, String message, JSDynamicObject exceptionObj, JSRealm realm)
public static JSException create(JSErrorType type, String message, JSDynamicObject exceptionObj, JSRealm realm)
public static JSException create(JSErrorType type, String message, com.oracle.truffle.api.nodes.Node originatingNode, JSDynamicObject exceptionObj, JSRealm realm)
public static JSException create(JSErrorType type, String message)
public static JSException create(JSErrorType type, String message, com.oracle.truffle.api.nodes.Node originatingNode)
public static JSException create(JSErrorType type, String message, Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
public static JSException create(JSErrorType type, String message, com.oracle.truffle.api.source.SourceSection sourceLocation, boolean isIncompleteSource)
public static JSException create(JSErrorType type, String message, Throwable cause, com.oracle.truffle.api.source.SourceSection sourceLocation, boolean isIncompleteSource)
public static int getStackTraceLimit(JSRealm realm)
public String getMessage()
getMessage in class Throwablepublic String getRawMessage()
public JSErrorType getErrorType()
public JSDynamicObject getErrorObjectLazy()
GraalJSExceptiongetErrorObjectLazy in class GraalJSExceptionpublic void setErrorObject(JSDynamicObject exceptionObj)
public Object getErrorObject()
GraalJSExceptiongetErrorObject in class GraalJSExceptionpublic JSRealm getRealm()
public com.oracle.truffle.api.interop.ExceptionType getExceptionType()
public boolean isExceptionIncompleteSource()
public boolean hasMembers()
public Object getMembers(boolean internal, com.oracle.truffle.api.interop.InteropLibrary delegateLib) throws com.oracle.truffle.api.interop.UnsupportedMessageException
com.oracle.truffle.api.interop.UnsupportedMessageExceptionpublic boolean isMemberReadable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib)
public boolean isMemberModifiable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib)
public boolean isMemberInsertable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib)
public boolean isMemberRemovable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib)
public boolean isMemberInvocable(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib)
public boolean hasMemberReadSideEffects(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib)
public boolean hasMemberWriteSideEffects(String key, com.oracle.truffle.api.interop.InteropLibrary delegateLib)
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
com.oracle.truffle.api.interop.UnknownIdentifierExceptioncom.oracle.truffle.api.interop.UnsupportedMessageExceptionpublic 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
com.oracle.truffle.api.interop.UnsupportedMessageExceptioncom.oracle.truffle.api.interop.UnknownIdentifierExceptioncom.oracle.truffle.api.interop.UnsupportedTypeExceptionpublic void removeMember(String key, 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.UnsupportedMessageExceptioncom.oracle.truffle.api.interop.UnknownIdentifierExceptionpublic 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
com.oracle.truffle.api.interop.UnsupportedMessageExceptioncom.oracle.truffle.api.interop.UnknownIdentifierExceptioncom.oracle.truffle.api.interop.ArityExceptioncom.oracle.truffle.api.interop.UnsupportedTypeExceptionpublic boolean hasMetaObject(com.oracle.truffle.api.interop.InteropLibrary delegateLib)
public Object getMetaObject(com.oracle.truffle.api.interop.InteropLibrary delegateLib) throws com.oracle.truffle.api.interop.UnsupportedMessageException
com.oracle.truffle.api.interop.UnsupportedMessageExceptionpublic static void ensureInitialized()
throws ClassNotFoundException
ClassNotFoundException