package com.stylefeng.guns.rest.common.exception;

/**
 * 所有业务异常的枚举
 *
 * @author fengshuonan
 * @date 2016年11月12日 下午5:04:51
 */
public enum BizExceptionEnum {

    AUTH_REQUEST_ERROR(700, "auth请求验证失败"),
    TOKEN_EXPIRED(700, "token 过期"),
    AUTH_ERROR(700, "签名错误,请求失败"),
    SERVER_ERROR(802, "服务器错误");

    BizExceptionEnum(int code, String message) {
        this.friendlyCode = code;
        this.friendlyMsg = message;
    }

    private int friendlyCode;

    private String friendlyMsg;

    public int getCode() {
        return friendlyCode;
    }

    public void setCode(int code) {
        this.friendlyCode = code;
    }

    public String getMessage() {
        return friendlyMsg;
    }

    public void setMessage(String message) {
        this.friendlyMsg = message;
    }

}
