Enum Error

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Error>

    public enum Error
    extends java.lang.Enum<Error>
    This list various errors that can occur during user login.
    • Enum Constant Detail

      • LOGIN_ERROR_UNKNOWN

        public static final Error LOGIN_ERROR_UNKNOWN
        General Server Side error
      • LOGIN_ERROR_BAD_REQUEST

        public static final Error LOGIN_ERROR_BAD_REQUEST
        Bad request
      • LOGIN_ERROR_INTERNAL_ERROR

        public static final Error LOGIN_ERROR_INTERNAL_ERROR
        Internal server error
      • LOGIN_ERROR_BAD_RESPONSE

        public static final Error LOGIN_ERROR_BAD_RESPONSE
        Invalid response from server.
      • LOGIN_ERROR_CONNECTION_ERROR

        public static final Error LOGIN_ERROR_CONNECTION_ERROR
        Connection Error.
      • LOGIN_ERROR_SERVICE_NOT_FOUND

        public static final Error LOGIN_ERROR_SERVICE_NOT_FOUND
        Service not found
      • LOGIN_ERROR_INVALID_CREDENTIAL

        public static final Error LOGIN_ERROR_INVALID_CREDENTIAL
        Provided credentials are not valid.
      • LOGIN_ERROR_ALREADY_LOGGED_IN

        public static final Error LOGIN_ERROR_ALREADY_LOGGED_IN
        Already logged in
      • LOGIN_ERROR_NOT_LOGGED_IN

        public static final Error LOGIN_ERROR_NOT_LOGGED_IN
        Not logged in.
    • Method Detail

      • values

        public static Error[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Error c : Error.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Error valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getErrorMessage

        public static java.lang.String getErrorMessage​(Error error)
        Get details of the error.
        Parameters:
        error - Error - Error object.
        Returns:
        A String message with error details.
      • getErrorById

        public static Error getErrorById​(int id)
      • getValue

        public int getValue()
      • getErrorId

        public int getErrorId()