1、业务异常
/** * @Description: 业务异常 * @Author: Yaoson * @Create: 2022/4/21 0:05 **/ public class BusinessException extends RuntimeException{ private String message; public BusinessException(String message) { super(message); } @Override public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
2、系统异常
/** * @Description: 业务异常 * @Author: Yaoson * @Create: 2022/4/21 0:05 **/ public class SystemException extends RuntimeException{ private String message; public SystemException(String message) { super(message); } @Override public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }