import java.util.Objects;
public abstract class BaseException extends RuntimeException{
public static final long serialVersionUID = -7034897190745766940L;
private transient ErrorCode errorCode;
private transient Objects[] messageArgs;
public ErrorCode getErrorCode() {
return errorCode;
}
public Objects[] getMessageArgs() {
return messageArgs;
}
public BaseException(String message) {
super(message);
}
public BaseException(String message, Throwable cause) {
super(message, cause);
}
public BaseException(ErrorCode errorCode, Throwable cause) {
super(errorCode.getMessage(), cause);
this.errorCode = errorCode;
}
}