package com.zcxk.security.exception;


import com.zcxk.model.ResultStatus;
import org.springframework.security.core.AuthenticationException;

public class SecurityException extends AuthenticationException {
    protected int status = ResultStatus.APPLICATION_ERROR.getStatus();
    public SecurityException(String msg) {
        super(msg);
    }

    public SecurityException(int status, String msg) {
        super(msg);
        this.status = status;
    }

    public SecurityException(ResultStatus resultStatus) {
        super(resultStatus.getMessage());
        this.status = resultStatus.getStatus();
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
}
