Package convex.core

Class ErrorCodes

java.lang.Object
convex.core.ErrorCodes

public class ErrorCodes extends Object
Standard codes used for CVM Exceptional Conditions. An Exceptional Condition may include a Message, which is kept outside CVM state but may be user to return information to the relevant client.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Keyword
    Error code for when an argument is of the correct type, but is not an allowable value.
    static final Keyword
    Error code when function or expander application has an inappropriate number of arguments.
    static final Keyword
    Error code indicating that an asserted condition was not met.
    static final Keyword
    Error code for when indexed access is attempted that is out of bounds for some sequential object.
    static final Keyword
    Error code when the type of some argument cannot be cast to a suitable type for some requested operation.
    static final Keyword
    ErrorCode indicating failure of a child transaction
    static final Keyword
    Error code caused by compilation failure with an invalid AST.
    static final Keyword
    Error code for when a transaction exceeds execution depth limits.
    static final Keyword
    Error code for unhandled exceptions
    static final Keyword
    Error code caused by failure to successfully expand an AST node.
    static final Keyword
    ErrorCode for a FATAL Error.
    static final Keyword
    ErrorCode for a message format error.
    static final Keyword
    Error code for when the specified account does not have enough available funds to perform an operation
    static final Keyword
    Exceptional Condition indicating a halt operation was executed.
    static final Keyword
    Error code for when a transaction runs out of available juice
    static final Keyword
     
    static final Keyword
    Error code for situations where a transaction is unable to complete due to insufficient Memory Allowance.
    static final Keyword
    Error code when attempting to perform an action using a non-existent Account
    static final Keyword
     
    static final Keyword
    Exceptional Condition indicating a recur operation was executed This will return execution to the surrounding loop or function binding, which will be re-executed with new bindings provided to the recur operation.
    static final Keyword
    Exceptional condition indicated a 'reduced' result.
    static final Keyword
    Exceptional Condition indicating a return operation was executed This will return execution to the caller of surrounding function binding, with whatever value is passed to the return operation as a result.
    static final Keyword
    Exceptional Condition indicating a halt operation was executed.
    static final Keyword
    Error code for a bad sequence.
    static final Keyword
    Exceptional Condition indicating a bad signature on a transaction.
    static final Keyword
    Error code for a request that would normally be valid, but failed because some aspect of actor / system state was wrong.
    static final Keyword
    Exceptional Condition indicating a tailcall operation has been executed This will return execution to the surrounding loop or function binding, which will be re-executed with new bindings provided to the recur operation.
    static final Keyword
     
    static final Keyword
    Exceptional Condition indicating something is not yet implemented
    static final Keyword
    Error code indicating that an a trust condition was violated.
    static final Keyword
    Error code when an undeclared symbol is accessed
    static final Keyword
    ErrorCode for an unexpected Error.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SEQUENCE

      public static final Keyword SEQUENCE
      Error code for a bad sequence. This Error Condition is generated by the CVM only during transaction preparation if the Sequence Number for the new transaction is wrong for the given Account (it must be one greater than the Sequence Number of the last transaction executed which is stored in the Account). This Error code may be returned by Peers before publishing a transaction to the network, if the Sequence Number cannot possibly be correct (i.e. less than the current Sequence Number). The message is expected to be the current sequence number: Clients may use this to automatically correct and re-submit transactions with the correct sequence, although this is unreliable if multiple clients are sending transactions for the same Account.
    • FUNDS

      public static final Keyword FUNDS
      Error code for when the specified account does not have enough available funds to perform an operation
    • JUICE

      public static final Keyword JUICE
      Error code for when a transaction runs out of available juice
    • DEPTH

      public static final Keyword DEPTH
      Error code for when a transaction exceeds execution depth limits. Typically, this indicates infinite recursion.
    • MEMORY

      public static final Keyword MEMORY
      Error code for situations where a transaction is unable to complete due to insufficient Memory Allowance. This Error Condition is only be generated by the CVM during the failure of transaction completion. Within transactions, memory usage may exceed allowances as long as there is enough juice to pay for the temporary allocations.
    • NOBODY

      public static final Keyword NOBODY
      Error code when attempting to perform an action using a non-existent Account
    • ARITY

      public static final Keyword ARITY
      Error code when function or expander application has an inappropriate number of arguments. Arity is checked first: it takes precedence over CAST and ARGUMENT errors.
    • UNDECLARED

      public static final Keyword UNDECLARED
      Error code when an undeclared symbol is accessed
    • CAST

      public static final Keyword CAST
      Error code when the type of some argument cannot be cast to a suitable type for some requested operation. ARITY errors take predecence over CAST errors if both are applicable.
    • BOUNDS

      public static final Keyword BOUNDS
      Error code for when indexed access is attempted that is out of bounds for some sequential object.
    • ARGUMENT

      public static final Keyword ARGUMENT
      Error code for when an argument is of the correct type, but is not an allowable value.
    • STATE

      public static final Keyword STATE
      Error code for a request that would normally be valid, but failed because some aspect of actor / system state was wrong. Typically indicates that some preparatory step was omitted, appropriate pre-conditions were not checked, or an operation was attempted at an inappropriate time
    • COMPILE

      public static final Keyword COMPILE
      Error code caused by compilation failure with an invalid AST. Should only occur during compile phase of on-chain Compiler
    • EXPAND

      public static final Keyword EXPAND
      Error code caused by failure to successfully expand an AST node. Should only occur during expand phase of on-chain Compiler
    • ASSERT

      public static final Keyword ASSERT
      Error code indicating that an asserted condition was not met. This usually indicates invalid input that failed a precondition check. The message should be used to give meaningful feedback to the User.
    • TRUST

      public static final Keyword TRUST
      Error code indicating that an a trust condition was violated. This usually means a USer or Actor attempted to perform an unauthorised operation.
    • UNEXPECTED

      public static final Keyword UNEXPECTED
      ErrorCode for an unexpected Error. Likely fatal.
    • EXCEPTION

      public static final Keyword EXCEPTION
      Error code for unhandled exceptions
    • HALT

      public static final Keyword HALT
      Exceptional Condition indicating a halt operation was executed. This will halt the currently executing transaction context and return to the caller.
    • RECUR

      public static final Keyword RECUR
      Exceptional Condition indicating a recur operation was executed This will return execution to the surrounding loop or function binding, which will be re-executed with new bindings provided to the recur operation.
    • TAILCALL

      public static final Keyword TAILCALL
      Exceptional Condition indicating a tailcall operation has been executed This will return execution to the surrounding loop or function binding, which will be re-executed with new bindings provided to the recur operation.
    • RETURN

      public static final Keyword RETURN
      Exceptional Condition indicating a return operation was executed This will return execution to the caller of surrounding function binding, with whatever value is passed to the return operation as a result.
    • REDUCED

      public static final Keyword REDUCED
      Exceptional condition indicated a 'reduced' result.
    • ROLLBACK

      public static final Keyword ROLLBACK
      Exceptional Condition indicating a halt operation was executed. This will terminate the currently executing transaction context, roll back any state changes and return to the caller with whatever value is passed as the rollback result.
    • SIGNATURE

      public static final Keyword SIGNATURE
      Exceptional Condition indicating a bad signature on a transaction.
    • TODO

      public static final Keyword TODO
      Exceptional Condition indicating something is not yet implemented
    • FATAL

      public static final Keyword FATAL
      ErrorCode for a FATAL Error. Should trigger Peer shutdown.
    • FORMAT

      public static final Keyword FORMAT
      ErrorCode for a message format error.
    • LOAD

      public static final Keyword LOAD
    • CHILD

      public static final Keyword CHILD
      ErrorCode indicating failure of a child transaction
    • TIMEOUT

      public static final Keyword TIMEOUT
    • PEER

      public static final Keyword PEER
  • Constructor Details

    • ErrorCodes

      public ErrorCodes()