org.macrocloud.kernel.auth.exception.SecureException Maven / Gradle / Ivy
package org.macrocloud.kernel.auth.exception;
import org.macrocloud.kernel.toolkit.api.IResultCode;
import org.macrocloud.kernel.toolkit.api.ResultCode;
import lombok.Getter;
/**
* Secure异常
*
*/
public class SecureException extends RuntimeException {
private static final long serialVersionUID = 2359767895161832954L;
@Getter
private final IResultCode resultCode;
public SecureException(String message) {
super(message);
this.resultCode = ResultCode.UN_AUTHORIZED;
}
public SecureException(IResultCode resultCode) {
super(resultCode.getMessage());
this.resultCode = resultCode;
}
public SecureException(IResultCode resultCode, Throwable cause) {
super(cause);
this.resultCode = resultCode;
}
@Override
public Throwable fillInStackTrace() {
return this;
}
}