public class BaseRuntimeException
extends RuntimeException {
private final int code;
public BaseRuntimeException(StatusCode statusCode) {
this(statusCode.getStatusCode(), statusCode.getStatusMessage());
}
public BaseRuntimeException(
int code, String message) {
super(message);
this.code =
code;
}
public int getCode() {
return this.code;
}
}
转载于:https://www.cnblogs.com/shaozhiqi/p/8999486.html
转载请注明原文地址: https://mac.8miu.com/read-73742.html