Enum Class Errors.ErrorCode

java.lang.Object
java.lang.Enum<Errors.ErrorCode>
stawa.vitalstrike.Errors.ErrorCode
All Implemented Interfaces:
Serializable, Comparable<Errors.ErrorCode>, Constable
Enclosing class:
Errors

public static enum Errors.ErrorCode extends Enum<Errors.ErrorCode>
Enum representing different types of errors that can occur in VitalStrike. Each error type has a unique numeric code and default message.
  • Enum Constant Details

    • UNKNOWN

      public static final Errors.ErrorCode UNKNOWN
      Represents an unknown or unspecified error with code 1000
    • DATABASE_ERROR

      public static final Errors.ErrorCode DATABASE_ERROR
      Represents a database operation failure with code 2000
    • CONFIG_ERROR

      public static final Errors.ErrorCode CONFIG_ERROR
      Represents a configuration-related error with code 3000
    • PLAYER_ERROR

      public static final Errors.ErrorCode PLAYER_ERROR
      Represents a player-related error with code 4000
    • COMMAND_ERROR

      public static final Errors.ErrorCode COMMAND_ERROR
      Represents an invalid command usage error with code 5000
    • PERMISSION_ERROR

      public static final Errors.ErrorCode PERMISSION_ERROR
      Represents a permission denied error with code 6000
    • NETWORK_ERROR

      public static final Errors.ErrorCode NETWORK_ERROR
      Represents a network operation failure with code 7000
    • PLUGIN_ERROR

      public static final Errors.ErrorCode PLUGIN_ERROR
      Represents a plugin operation failure with code 8000
    • UPDATE_ERROR

      public static final Errors.ErrorCode UPDATE_ERROR
      Represents an update operation failure with code 9000
  • Method Details

    • values

      public static Errors.ErrorCode[] 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 Errors.ErrorCode 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
    • getCode

      public int getCode()
      Gets the numeric code associated with this error type
      Returns:
      the error code
    • getDefaultMessage

      public String getDefaultMessage()
      Gets the default message associated with this error type
      Returns:
      the default error message