Class GraalJSException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.oracle.truffle.api.exception.AbstractTruffleException
com.oracle.truffle.js.runtime.GraalJSException
All Implemented Interfaces:
com.oracle.truffle.api.interop.TruffleObject, Serializable
Direct Known Subclasses:
JSException, UserScriptException

public abstract class GraalJSException extends com.oracle.truffle.api.exception.AbstractTruffleException
See Also:
  • Constructor Details

    • GraalJSException

      protected GraalJSException(String message, Throwable cause, com.oracle.truffle.api.nodes.Node node, int stackTraceLimit)
    • GraalJSException

      protected GraalJSException(String message, com.oracle.truffle.api.nodes.Node node, int stackTraceLimit)
    • GraalJSException

      protected GraalJSException(String message, Throwable cause, com.oracle.truffle.api.source.SourceSection location, int stackTraceLimit)
  • Method Details

    • fillInStackTrace

      protected static <T extends GraalJSException> T fillInStackTrace(T exception, boolean capture, JSDynamicObject skipFramesUpTo, boolean customSkip)
    • fillInStackTrace

      protected static <T extends GraalJSException> T fillInStackTrace(T exception, boolean capture)
    • fillInStackTrace

      protected final GraalJSException fillInStackTrace(boolean capture, JSDynamicObject skipFramesUpTo, boolean customSkip)
    • hasSourceLocation

      public boolean hasSourceLocation()
    • getSourceLocationInterop

      public com.oracle.truffle.api.source.SourceSection getSourceLocationInterop() throws com.oracle.truffle.api.interop.UnsupportedMessageException
      Throws:
      com.oracle.truffle.api.interop.UnsupportedMessageException
    • getErrorObjectLazy

      public abstract Object getErrorObjectLazy()
      Could still be null due to lazy initialization.
    • getErrorObject

      public abstract Object getErrorObject()
      Eager access to the ErrorObject. Use only if you must get a non-null error object.
    • getJSStackTrace

      public GraalJSException.JSStackTraceElement[] getJSStackTrace()
    • setJSStackTrace

      public void setJSStackTrace(GraalJSException.JSStackTraceElement[] jsStackTrace)
    • getJSStackTrace

      public static GraalJSException.JSStackTraceElement[] getJSStackTrace(com.oracle.truffle.api.nodes.Node originatingNode)
    • getJSStackTrace

      public static GraalJSException.JSStackTraceElement[] getJSStackTrace(com.oracle.truffle.api.nodes.Node originatingNode, int stackTraceLimit)
    • printJSStackTrace

      public void printJSStackTrace()
    • printJSStackTrace

      public static void printJSStackTrace(com.oracle.truffle.api.nodes.Node originatingNode)
    • hasLanguage

      public final boolean hasLanguage()
    • getLanguage

      public final Class<? extends com.oracle.truffle.api.TruffleLanguage<?>> getLanguage()
    • toDisplayString

      public final Object toDisplayString(boolean allowSideEffects)
    • identityHashCode

      public final int identityHashCode(com.oracle.truffle.api.interop.InteropLibrary thisLib) throws com.oracle.truffle.api.interop.UnsupportedMessageException
      Throws:
      com.oracle.truffle.api.interop.UnsupportedMessageException