标签:异常 equal 代码 get mes xtend extends alsa exce
@EqualsAndHashCode(callSuper = true)
@Data
public class ServiceException extends RuntimeException {
private Integer code;
private String errorMessage;
public ServiceException(Integer code, String errorMessage) {
super(errorMessage);
this.code = code;
this.errorMessage = errorMessage;
}
public ServiceException(AbstractBaseExceptionEnum exception) {
super(exception.getMessage());
this.code = exception.getCode();
this.errorMessage = exception.getMessage();
}
}
标签:异常 equal 代码 get mes xtend extends alsa exce
原文地址:https://www.cnblogs.com/yuteng666/p/14966607.html