Class UnexpectedResultException

All Implemented Interfaces:
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.
Since:
0.8 or earlier
See Also:
  • Constructor Details

    • UnexpectedResultException

      public UnexpectedResultException(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
      Since:
      0.8 or earlier
  • Method Details

    • getResult

      public Object getResult()
      Returns:
      the unexpected result
      Since:
      0.8 or earlier