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,
com.oracle.truffle.api.object.DynamicObject 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,
com.oracle.truffle.api.object.DynamicObject 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 |
createCapture(JSErrorType type,
String message,
com.oracle.truffle.api.object.DynamicObject exceptionObj,
JSRealm realm) |
static JSException |
createCapture(JSErrorType type,
String message,
com.oracle.truffle.api.object.DynamicObject exceptionObj,
JSRealm realm,
int stackTraceLimit,
com.oracle.truffle.api.object.DynamicObject skipFramesUpTo) |
com.oracle.truffle.api.object.DynamicObject |
getErrorObject()
Could still be null due to lazy initialization.
|
Object |
getErrorObjectEager() |
Object |
getErrorObjectEager(JSContext context)
Eager access to the ErrorObject.
|
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(com.oracle.truffle.api.object.DynamicObject exceptionObj) |
JSException |
setRealm(JSRealm realm) |
JSException |
useCallerRealm() |
void |
writeMember(String key,
Object value,
com.oracle.truffle.api.interop.InteropLibrary delegateLib) |
fillInStackTrace, fillInStackTrace, 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, com.oracle.truffle.api.object.DynamicObject exceptionObj, JSRealm realm, int stackTraceLimit, com.oracle.truffle.api.object.DynamicObject skipFramesUpTo)
public static JSException createCapture(JSErrorType type, String message, com.oracle.truffle.api.object.DynamicObject exceptionObj, JSRealm realm)
public static JSException create(JSErrorType type, String message, com.oracle.truffle.api.object.DynamicObject exceptionObj, JSRealm realm)
public static JSException create(JSErrorType type, String message, com.oracle.truffle.api.nodes.Node originatingNode, com.oracle.truffle.api.object.DynamicObject 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 int getStackTraceLimit(JSRealm realm)
public String getMessage()
getMessage in class Throwablepublic String getRawMessage()
public JSErrorType getErrorType()
public com.oracle.truffle.api.object.DynamicObject getErrorObject()
GraalJSExceptiongetErrorObject in class GraalJSExceptionpublic void setErrorObject(com.oracle.truffle.api.object.DynamicObject exceptionObj)
public Object getErrorObjectEager()
getErrorObjectEager in class GraalJSExceptionpublic Object getErrorObjectEager(JSContext context)
GraalJSExceptiongetErrorObjectEager in class GraalJSExceptionpublic JSException setRealm(JSRealm realm)
public JSRealm getRealm()
public JSException useCallerRealm()
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.UnsupportedMessageException