package com.hx.exception; /** 判断异常/业务异常 * @author ChenJiaHe * @Date 2020-06-19 */ public class ServiceException extends RuntimeException { private Integer code; public ServiceException(String message) { super(message); } public ServiceException(String message, Integer code) { super(message); this.code = code; } public ServiceException(String message, Throwable cause, Integer code) { super(message, cause); this.code = code; } public ServiceException(Throwable cause, Integer code) { super(cause); this.code = code; } public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } }