top.doudou.core.exception.CommonEnum Maven / Gradle / Ivy
package top.doudou.core.exception;
/**
* @Description 通用的错误枚举
* @Author 傻男人 <[email protected]>
* @Date 2021-04-15 16:21
* @Version V1.0
*/
public enum CommonEnum implements BaseErrorInfo {
SUCCESS(200, "成功"),
BODY_NOT_MATCH(400, "请求的数据格式不符"),
SIGNATURE_NOT_MATCH(401, "请求的数字签名不匹配"),
NOT_FOUND(400, "未找到该资源"),
INTERNAL_SERVER_ERROR(500, "服务器内部错误"),
SERVER_BUSY(503, "服务器正忙,请稍后再试"),
UN_AUTHORITY(401,"没有权限")
;
/**
* 错误码
*/
private int code;
/**
* 错误描述
*/
private String msg;
CommonEnum(int code, String msg) {
this.code = code;
this.msg = msg;
}
@Override
public int getErrCode() {
return code;
}
@Override
public String getErrMsg() {
return msg;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy