package com.YuyeTech.TPlat.exception;

import com.YuyeTech.TPlat.enums.UserEnum;
import lombok.Getter;

/**
 * @author:slambb
 * @date:2019/12/5
 */
@Getter
public class UserException extends RuntimeException{
    private Integer code;

    public UserException(UserEnum userEnum) {
        super(userEnum.getMessage());

        this.code = userEnum.getCode();
    }

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