自定义异常类,继承RuntimeException
/**
* 自定制异常类
*
* @author MoCha
* @date 2019/5/25
*/
@Getter
public class CustomException extends RuntimeException {
private int code;
private String message;
public CustomException(int code, String message) {
this.code = code;
this.message = message;
}
public CustomException(ResultStatusEnum resultStatusEnum) {
this.code = resultStatusEnum