matrix.boot.common.exception.I18nServiceException Maven / Gradle / Ivy
package matrix.boot.common.exception;
/**
* 国际化业务异常类
*
* @author wangcheng
* date 2022/10/28
*/
public class I18nServiceException extends RuntimeException {
private static final long serialVersionUID = 1L;
/**
* 异常信息编码
*/
private String messageCode;
/**
* 错误编码
*/
private Integer errorCode;
public I18nServiceException() {
super();
}
public I18nServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
public I18nServiceException(String message, Throwable cause) {
super(message, cause);
}
public I18nServiceException(String messageCode) {
super(messageCode);
this.messageCode = messageCode;
}
public I18nServiceException(String messageCode, String message) {
super(message);
this.messageCode = messageCode;
}
public I18nServiceException(Throwable cause) {
super(cause.getMessage(), cause);
}
public String getMessageCode() {
return messageCode;
}
public I18nServiceException setMessageCode(String messageCode) {
this.messageCode = messageCode;
return this;
}
public Integer getErrorCode() {
return errorCode;
}
public I18nServiceException setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
return this;
}
}