Enum Class OpenemsError

java.lang.Object
java.lang.Enum<OpenemsError>
io.openems.common.exceptions.OpenemsError
All Implemented Interfaces:
Serializable, Comparable<OpenemsError>, Constable

public enum OpenemsError extends Enum<OpenemsError>
Holds named OpenEMS Errors.
  • Enum Constant Details

    • GENERIC

      public static final OpenemsError GENERIC
    • COMMON_NO_VALID_CHANNEL_ADDRESS

      public static final OpenemsError COMMON_NO_VALID_CHANNEL_ADDRESS
    • COMMON_USER_NOT_AUTHENTICATED

      public static final OpenemsError COMMON_USER_NOT_AUTHENTICATED
    • COMMON_ROLE_ACCESS_DENIED

      public static final OpenemsError COMMON_ROLE_ACCESS_DENIED
    • COMMON_AUTHENTICATION_FAILED

      public static final OpenemsError COMMON_AUTHENTICATION_FAILED
    • COMMON_USER_UNDEFINED

      public static final OpenemsError COMMON_USER_UNDEFINED
    • COMMON_ROLE_UNDEFINED

      public static final OpenemsError COMMON_ROLE_UNDEFINED
    • EDGE_NO_COMPONENT_WITH_ID

      public static final OpenemsError EDGE_NO_COMPONENT_WITH_ID
    • EDGE_MULTIPLE_COMPONENTS_WITH_ID

      public static final OpenemsError EDGE_MULTIPLE_COMPONENTS_WITH_ID
    • EDGE_UNABLE_TO_APPLY_CONFIG

      public static final OpenemsError EDGE_UNABLE_TO_APPLY_CONFIG
    • EDGE_UNABLE_TO_CREATE_CONFIG

      public static final OpenemsError EDGE_UNABLE_TO_CREATE_CONFIG
    • EDGE_UNABLE_TO_DELETE_CONFIG

      public static final OpenemsError EDGE_UNABLE_TO_DELETE_CONFIG
    • EDGE_CHANNEL_NO_OPTION

      public static final OpenemsError EDGE_CHANNEL_NO_OPTION
    • BACKEND_EDGE_NOT_CONNECTED

      public static final OpenemsError BACKEND_EDGE_NOT_CONNECTED
    • BACKEND_UI_TOKEN_MISSING

      public static final OpenemsError BACKEND_UI_TOKEN_MISSING
    • BACKEND_NO_UI_WITH_TOKEN

      public static final OpenemsError BACKEND_NO_UI_WITH_TOKEN
    • JSONRPC_ID_NOT_UNIQUE

      public static final OpenemsError JSONRPC_ID_NOT_UNIQUE
    • JSONRPC_UNHANDLED_METHOD

      public static final OpenemsError JSONRPC_UNHANDLED_METHOD
    • JSONRPC_INVALID_MESSAGE

      public static final OpenemsError JSONRPC_INVALID_MESSAGE
    • JSONRPC_RESPONSE_WITHOUT_REQUEST

      public static final OpenemsError JSONRPC_RESPONSE_WITHOUT_REQUEST
    • JSON_HAS_NO_MEMBER

      public static final OpenemsError JSON_HAS_NO_MEMBER
    • JSON_NO_INTEGER

      public static final OpenemsError JSON_NO_INTEGER
    • JSON_NO_INTEGER_MEMBER

      public static final OpenemsError JSON_NO_INTEGER_MEMBER
    • JSON_NO_OBJECT

      public static final OpenemsError JSON_NO_OBJECT
    • JSON_NO_OBJECT_MEMBER

      public static final OpenemsError JSON_NO_OBJECT_MEMBER
    • JSON_NO_PRIMITIVE

      public static final OpenemsError JSON_NO_PRIMITIVE
    • JSON_NO_PRIMITIVE_MEMBER

      public static final OpenemsError JSON_NO_PRIMITIVE_MEMBER
    • JSON_NO_ARRAY

      public static final OpenemsError JSON_NO_ARRAY
    • JSON_NO_ARRAY_MEMBER

      public static final OpenemsError JSON_NO_ARRAY_MEMBER
    • JSON_NO_DATE_MEMBER

      public static final OpenemsError JSON_NO_DATE_MEMBER
    • JSON_NO_STRING

      public static final OpenemsError JSON_NO_STRING
    • JSON_NO_STRING_MEMBER

      public static final OpenemsError JSON_NO_STRING_MEMBER
    • JSON_NO_BOOLEAN

      public static final OpenemsError JSON_NO_BOOLEAN
    • JSON_NO_BOOLEAN_MEMBER

      public static final OpenemsError JSON_NO_BOOLEAN_MEMBER
    • JSON_NO_NUMBER

      public static final OpenemsError JSON_NO_NUMBER
    • JSON_NO_NUMBER_MEMBER

      public static final OpenemsError JSON_NO_NUMBER_MEMBER
    • JSON_PARSE_ELEMENT_FAILED

      public static final OpenemsError JSON_PARSE_ELEMENT_FAILED
    • JSON_PARSE_FAILED

      public static final OpenemsError JSON_PARSE_FAILED
    • JSON_NO_ENUM_MEMBER

      public static final OpenemsError JSON_NO_ENUM_MEMBER
    • JSON_NO_INET4ADDRESS

      public static final OpenemsError JSON_NO_INET4ADDRESS
    • JSON_NO_ENUM

      public static final OpenemsError JSON_NO_ENUM
    • JSON_NO_FLOAT

      public static final OpenemsError JSON_NO_FLOAT
    • JSON_NO_FLOAT_MEMBER

      public static final OpenemsError JSON_NO_FLOAT_MEMBER
    • JSON_NO_SHORT

      public static final OpenemsError JSON_NO_SHORT
    • JSON_NO_SHORT_MEMBER

      public static final OpenemsError JSON_NO_SHORT_MEMBER
    • JSON_NO_LONG

      public static final OpenemsError JSON_NO_LONG
    • JSON_NO_LONG_MEMBER

      public static final OpenemsError JSON_NO_LONG_MEMBER
    • JSON_NO_DOUBLE

      public static final OpenemsError JSON_NO_DOUBLE
    • JSON_NO_DOUBLE_MEMBER

      public static final OpenemsError JSON_NO_DOUBLE_MEMBER
    • JSON_NO_STRING_ARRAY

      public static final OpenemsError JSON_NO_STRING_ARRAY
    • JSON_NO_INET4ADDRESS_MEMBER

      public static final OpenemsError JSON_NO_INET4ADDRESS_MEMBER
    • JSON_NO_UUID

      public static final OpenemsError JSON_NO_UUID
    • JSON_NO_UUID_MEMBER

      public static final OpenemsError JSON_NO_UUID_MEMBER
    • XML_HAS_NO_MEMBER

      public static final OpenemsError XML_HAS_NO_MEMBER
    • XML_NO_STRING_MEMBER

      public static final OpenemsError XML_NO_STRING_MEMBER
  • Method Details

    • values

      public static OpenemsError[] 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 OpenemsError 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
    • fromCode

      public static OpenemsError fromCode(int code) throws OpenemsException
      Gets an OpenEMS-Error from its code.
      Parameters:
      code - the error code
      Returns:
      the OpenEMS-Error
      Throws:
      OpenemsException - if no standard exception with this error code exists.
    • getCode

      public int getCode()
    • getRawMessage

      public String getRawMessage()
    • getMessage

      public String getMessage(Object... params)
      Gets the formatted Error message.
      Parameters:
      params - the error parameters
      Returns:
      the error message as String
    • exception

      public OpenemsError.OpenemsNamedException exception(Object... params)
      Creates a OpenEMS Named Exception from this Error.

      Use like: `throw OpenemsError.GENERIC.exception(...)`

      Parameters:
      params - the params for the Error message
      Returns:
      OpenemsNamedException