Class UnexpectedResultException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class UnexpectedResultException
    extends SlowPathException
    An exception that should be thrown if the return value cannot be represented as a value of the return type. The Truffle optimizer has special knowledge of this exception class and will never compile a catch block that catches this exception type.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      UnexpectedResultException​(java.lang.Object result)
      Creates the exception with the alternative result that cannot be represented as a value of the return type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getResult()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UnexpectedResultException

        public UnexpectedResultException​(java.lang.Object result)
        Creates the exception with the alternative result that cannot be represented as a value of the return type.
        Parameters:
        result - the alternative result
    • Method Detail

      • getResult

        public java.lang.Object getResult()
        Returns:
        the unexpected result