package com.YuyeTech.HeartRate.exception;

import com.YuyeTech.HeartRate.enums.ResultEnum;
import lombok.Getter;

/**
 * @author:slambb
 * @date:2019/12/13
 */
@Getter
public class AuthorizeException extends RuntimeException {

    private Integer code;

    public AuthorizeException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());

        this.code = resultEnum.getCode();
    }

    public AuthorizeException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
