package cn.com.qmth.stmms.biz.api.auth.exception;

public class ApiException extends RuntimeException {

    private static final long serialVersionUID = -4104244511495148577L;

    private int code;

    private ApiException(int code, String message) {
        super(message);
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public static final ApiException USER_UNEXISTS = new ApiException(401, "user unexists");

    public static final ApiException USER_PASSWORD_ERROR = new ApiException(401, "user password error");

    public static final ApiException USER_NOT_ADMIN = new ApiException(401, "user is not admin");

    public static final ApiException EXAM_NOT_ACCESSIBLED = new ApiException(401, "user cannot access specified exam");

}
