com.cloud.platform.common.exception.BaseException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
project for platform-common
The newest version!
package com.cloud.platform.common.exception;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Description:
* @Author: ZhouShuai
* @Date: 2021-06-27 16:24
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseException extends RuntimeException {
private static final long serialVersionUID = -3962157388406613297L;
/**
* 错误码
*/
private String errorCode;
/**
* 错误提示
*/
private String errorTips;
public BaseException(String errorCode, String errorMessage, String errorTips) {
super(errorMessage);
this.errorCode = errorCode;
this.errorTips = errorTips;
}
public BaseException(BaseExceptionCode baseErrorCode, String errorMessage) {
super(errorMessage);
this.errorCode = baseErrorCode.getErrorCode();
this.errorTips = baseErrorCode.getErrorMessage();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy