cn.hippo4j.common.web.exception.ErrorCodeEnum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hippo4j-common Show documentation
Show all versions of hippo4j-common Show documentation
HIPPO4J、HIPPO4J-CORE 公共代码库.
package cn.hippo4j.common.web.exception;
/**
* Error code enum.
*
* @author chen.ma
* @date 2021/3/19 16:07
*/
public enum ErrorCodeEnum {
UNKNOWN_ERROR {
@Override
public String getCode() {
return "1";
}
@Override
public String getMessage() {
return "UNKNOWN_ERROR";
}
},
VALIDATION_ERROR {
@Override
public String getCode() {
return "2";
}
@Override
public String getMessage() {
return "VALIDATION_ERROR";
}
},
SERVICE_ERROR {
@Override
public String getCode() {
return "3";
}
@Override
public String getMessage() {
return "SERVICE_ERROR";
}
},
NOT_FOUND {
@Override
public String getCode() {
return "404";
}
@Override
public String getMessage() {
return "NOT_FOUND";
}
};
public abstract String getCode();
public abstract String getMessage();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy