Class JSErrorObject

All Implemented Interfaces:
com.oracle.truffle.api.interop.TruffleObject, JSCopyableObject

public final class JSErrorObject extends JSNonProxyObject implements JSCopyableObject
  • Constructor Details

    • JSErrorObject

      protected JSErrorObject(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto)
  • Method Details

    • create

      public static JSErrorObject create(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto)
    • copyWithoutProperties

      protected JSObject copyWithoutProperties(com.oracle.truffle.api.object.Shape shape)
      Overrides:
      copyWithoutProperties in class JSObject
    • getException

      public GraalJSException getException()
    • setException

      public void setException(GraalJSException exception)
    • getClassName

      public com.oracle.truffle.api.strings.TruffleString getClassName()
      Description copied from class: JSDynamicObject
      The [[Class]] internal property. For ES5, this is the second part of what Object.prototype.toString.call(myObj) returns, e.g. "[object Array]".
      Overrides:
      getClassName in class JSNonProxyObject
    • getBuiltinToStringTag

      public com.oracle.truffle.api.strings.TruffleString getBuiltinToStringTag()
      Description copied from class: JSObject
      Returns builtinTag as per Object.prototype.toString(). By default returns "Object".
      Overrides:
      getBuiltinToStringTag in class JSObject
      Returns:
      built-in toStringTag
    • isException

      public boolean isException()
    • throwException

      public RuntimeException throwException()
    • getExceptionType

      public com.oracle.truffle.api.interop.ExceptionType getExceptionType(com.oracle.truffle.api.interop.InteropLibrary exceptions) throws com.oracle.truffle.api.interop.UnsupportedMessageException
      Throws:
      com.oracle.truffle.api.interop.UnsupportedMessageException
    • isExceptionIncompleteSource

      public boolean isExceptionIncompleteSource(com.oracle.truffle.api.interop.InteropLibrary exceptions) throws com.oracle.truffle.api.interop.UnsupportedMessageException
      Throws:
      com.oracle.truffle.api.interop.UnsupportedMessageException
    • hasExceptionMessage

      public boolean hasExceptionMessage(com.oracle.truffle.api.interop.InteropLibrary exceptions)
    • getExceptionMessage

      public Object getExceptionMessage(com.oracle.truffle.api.interop.InteropLibrary exceptions) throws com.oracle.truffle.api.interop.UnsupportedMessageException
      Throws:
      com.oracle.truffle.api.interop.UnsupportedMessageException
    • hasExceptionStackTrace

      public boolean hasExceptionStackTrace(com.oracle.truffle.api.interop.InteropLibrary exceptions)
    • getExceptionStackTrace

      public Object getExceptionStackTrace(com.oracle.truffle.api.interop.InteropLibrary exceptions) throws com.oracle.truffle.api.interop.UnsupportedMessageException
      Throws:
      com.oracle.truffle.api.interop.UnsupportedMessageException
    • hasExceptionCause

      public boolean hasExceptionCause(com.oracle.truffle.api.interop.InteropLibrary exceptions)
    • getExceptionCause

      public Object getExceptionCause(com.oracle.truffle.api.interop.InteropLibrary exceptions) throws com.oracle.truffle.api.interop.UnsupportedMessageException
      Throws:
      com.oracle.truffle.api.interop.UnsupportedMessageException
    • toDisplayStringImpl

      public com.oracle.truffle.api.strings.TruffleString toDisplayStringImpl(boolean allowSideEffects, ToDisplayStringFormat format, int depth)
      Description copied from class: JSDynamicObject
      A more informative toString variant, mainly used for error messages.
      Overrides:
      toDisplayStringImpl in class JSNonProxyObject
      Parameters:
      format - formatting parameters
      depth - current nesting depth
    • ensureInitialized

      public static void ensureInitialized() throws ClassNotFoundException
      Throws:
      ClassNotFoundException