package com.qs.mp.common.exception;

public class NoAuthorizationException extends RuntimeException{

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    
    protected final String code;
    protected final String message;

    public NoAuthorizationException() {
        this.code = "403"; //系统错误
        this.message = "没有访问权限";
    }
    
    public NoAuthorizationException(String code,String message)
    {
        this.code = code;
        this.message = message;
    }

    public NoAuthorizationException(String code,String message, Throwable e)
    {
        super(message, e);
        this.code = code;
        this.message = message;
    }

    @Override
    public String getMessage()
    {
        return message;
    }

    public String getCode() {
        return code;
    }

}
