Class AExceptional

java.lang.Object
convex.core.lang.impl.AExceptional
Direct Known Subclasses:
AReturn, ErrorValue

public abstract class AExceptional extends Object
Abstract base class for exceptional return values. Java exceptions are expensive and don't make it easy to provide exactly the semantics we want so we return exceptional values in response to errors during on-chain execution. Notable uses: - Early return values from functions - Tail calls - Loop / recur "Do not fear to be eccentric in opinion, for every opinion now accepted was once eccentric." ― Bertrand Russell
  • Constructor Details

    • AExceptional

      public AExceptional()
  • Method Details

    • getCode

      public abstract ACell getCode()
      Returns the Exception code for this exceptional value
      Returns:
      Exception Code
    • getMessage

      public abstract ACell getMessage()
      Gets the message for an exceptional value. May or may not be meaningful.
      Returns:
      Exception Message