Enum Class ExceptionCode

java.lang.Object
java.lang.Enum<ExceptionCode>
top.tangyh.basic.exception.code.ExceptionCode
所有已实现的接口:
Serializable, Comparable<ExceptionCode>, Constable, BaseExceptionCode

public enum ExceptionCode extends Enum<ExceptionCode> implements BaseExceptionCode
异常编码

1** 信息,服务器收到请求,需要请求者继续执行操作 2** 成功,操作被成功接收并处理 3** 重定向,需要进一步的操作以完成请求 4** 客户端错误,请求包含语法错误或无法完成请求 5** 服务器错误,服务器在处理请求的过程中发生了错误

业务编码规则: [系统]_[模块]_[功能]: 每段3位数,_只是java或js语言的语法糖,实际上的数字编码并不存在下划线

作者:
zuihou
  • 枚举常量详细资料

    • SUCCESS

      public static final ExceptionCode SUCCESS
    • SYSTEM_BUSY

      public static final ExceptionCode SYSTEM_BUSY
    • SYSTEM_TIMEOUT

      public static final ExceptionCode SYSTEM_TIMEOUT
    • PARAM_EX

      public static final ExceptionCode PARAM_EX
    • SQL_EX

      public static final ExceptionCode SQL_EX
    • NULL_POINT_EX

      public static final ExceptionCode NULL_POINT_EX
    • ILLEGAL_ARGUMENT_EX

      public static final ExceptionCode ILLEGAL_ARGUMENT_EX
    • MEDIA_TYPE_EX

      public static final ExceptionCode MEDIA_TYPE_EX
    • LOAD_RESOURCES_ERROR

      public static final ExceptionCode LOAD_RESOURCES_ERROR
    • BASE_VALID_PARAM

      public static final ExceptionCode BASE_VALID_PARAM
    • OPERATION_EX

      public static final ExceptionCode OPERATION_EX
    • SERVICE_MAPPER_ERROR

      public static final ExceptionCode SERVICE_MAPPER_ERROR
    • CAPTCHA_ERROR

      public static final ExceptionCode CAPTCHA_ERROR
    • JSON_PARSE_ERROR

      public static final ExceptionCode JSON_PARSE_ERROR
    • OK

      public static final ExceptionCode OK
    • BAD_REQUEST

      public static final ExceptionCode BAD_REQUEST
    • UNAUTHORIZED

      public static final ExceptionCode UNAUTHORIZED
      登录未授权。 客户端在访问请求的资源之前,对token进行验证,token无法正常解析时,返回此错误码,可以简单的理解为没有登录此站。

      401 Unauthorized. 需要重新登录。 该HTTP状态码表示认证错误,它是为了认证设计的,而不是为了授权设计的。收到401响应,表示请求没有被认证—压根没有认证或者认证不正确—但是请重新认证和重试。(一般在响应头部包含一个WWW-Authenticate来描述如何认证)。通常由web服务器返回,而不是web应用。从性质上来说是临时的东西。(服务器要求客户端重试)

      另请参阅:
    • FORBIDDEN

      public static final ExceptionCode FORBIDDEN
      访问资源 被禁止。 资源不可用,服务器理解客户的请求,但拒绝处理它。通常由于服务器上文件或目录的权限设置导致,可以简单的理解为没有权限访问此站。 该HTTP状态码是关于授权方面的。从性质上来说是永久的东西,和应用的业务逻辑相关联。它比401更具体,更实际。收到403响应表示服务器完成认证过程,但是客户端请求没有权限去访问要求的资源。
    • NOT_FOUND

      public static final ExceptionCode NOT_FOUND
      404 Not Found.
      另请参阅:
    • METHOD_NOT_ALLOWED

      public static final ExceptionCode METHOD_NOT_ALLOWED
    • TOO_MANY_REQUESTS

      public static final ExceptionCode TOO_MANY_REQUESTS
    • INTERNAL_SERVER_ERROR

      public static final ExceptionCode INTERNAL_SERVER_ERROR
    • BAD_GATEWAY

      public static final ExceptionCode BAD_GATEWAY
    • GATEWAY_TIMEOUT

      public static final ExceptionCode GATEWAY_TIMEOUT
    • JWT_USER_DISABLE

      public static final ExceptionCode JWT_USER_DISABLE
    • JWT_EMPLOYEE_DISABLE

      public static final ExceptionCode JWT_EMPLOYEE_DISABLE
    • JWT_TENANT_DISABLE

      public static final ExceptionCode JWT_TENANT_DISABLE
    • JWT_APPLICATION_FORBIDDEN

      public static final ExceptionCode JWT_APPLICATION_FORBIDDEN
    • JWT_RESOURCE_FORBIDDEN

      public static final ExceptionCode JWT_RESOURCE_FORBIDDEN
    • TRANSACTIONAL

      public static final ExceptionCode TRANSACTIONAL
    • REQUIRED_FILE_PARAM_EX

      public static final ExceptionCode REQUIRED_FILE_PARAM_EX
    • DATA_SAVE_ERROR

      public static final ExceptionCode DATA_SAVE_ERROR
    • DATA_UPDATE_ERROR

      public static final ExceptionCode DATA_UPDATE_ERROR
    • TOO_MUCH_DATA_ERROR

      public static final ExceptionCode TOO_MUCH_DATA_ERROR
    • JWT_BASIC_INVALID

      public static final ExceptionCode JWT_BASIC_INVALID
    • JWT_TOKEN_EXPIRED

      public static final ExceptionCode JWT_TOKEN_EXPIRED
    • JWT_SIGNATURE

      public static final ExceptionCode JWT_SIGNATURE
    • JWT_ILLEGAL_ARGUMENT

      public static final ExceptionCode JWT_ILLEGAL_ARGUMENT
    • JWT_GEN_TOKEN_FAIL

      public static final ExceptionCode JWT_GEN_TOKEN_FAIL
    • JWT_PARSER_TOKEN_FAIL

      public static final ExceptionCode JWT_PARSER_TOKEN_FAIL
    • JWT_USER_INVALID

      public static final ExceptionCode JWT_USER_INVALID
    • JWT_USER_ENABLED

      public static final ExceptionCode JWT_USER_ENABLED
    • JWT_OFFLINE

      public static final ExceptionCode JWT_OFFLINE
    • JWT_NOT_LOGIN

      public static final ExceptionCode JWT_NOT_LOGIN
  • 方法详细资料

    • values

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

      public static ExceptionCode 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.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值
    • getCode

      public int getCode()
      从接口复制的说明: BaseExceptionCode
      异常编码
      指定者:
      getCode 在接口中 BaseExceptionCode
      返回:
      异常编码
    • getMsg

      public String getMsg()
      从接口复制的说明: BaseExceptionCode
      异常消息
      指定者:
      getMsg 在接口中 BaseExceptionCode
      返回:
      异常消息
    • build

      public ExceptionCode build(String msg, Object... param)
    • param

      public ExceptionCode param(Object... param)