Enum Class Failure

java.lang.Object
java.lang.Enum<Failure>
com.patelheet.capitalengine.api.Failure
All Implemented Interfaces:
Serializable, Comparable<Failure>, Constable

public enum Failure extends Enum<Failure>
Why a mutation failed. New values are only ever added at the end.
  • Enum Constant Details

    • NONE

      public static final Failure NONE
      Not a failure.
    • INSUFFICIENT_FUNDS

      public static final Failure INSUFFICIENT_FUNDS
      An account would go below zero.
    • POLICY_LIMIT

      public static final Failure POLICY_LIMIT
      The caller's owner-set daily limit would be exceeded.
    • DENIED

      public static final Failure DENIED
      The owner denied this plugin from moving money this way.
    • INVALID_AMOUNT

      public static final Failure INVALID_AMOUNT
      Zero, negative or overflowing amount, or a bad type/memo.
    • NO_ACCOUNT

      public static final Failure NO_ACCOUNT
      An account doesn't exist.
    • NOT_ACCOUNT_OWNER

      public static final Failure NOT_ACCOUNT_OWNER
      Tried to take money out of another plugin's account, or out of the Treasury directly.
    • DUPLICATE_REFERENCE

      public static final Failure DUPLICATE_REFERENCE
      The reference was already used by this plugin; TxResult.txId() is the existing transaction. Treat as success.
    • ECONOMY_PAUSED

      public static final Failure ECONOMY_PAUSED
      Core can't reach its database right now.
    • INTERNAL

      public static final Failure INTERNAL
      Unexpected error inside core.
  • Method Details

    • values

      public static Failure[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Failure valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null