package com.om.exception;

import com.om.utils.ResultCode;
import lombok.Data;

/**
 * 业务异常类
 *需要继承运行时异常RuntimeException
 */
@Data
public class BizException extends RuntimeException {
    private Integer code = ResultCode.SERVICE_HANDLE_ERROR;
    private String message = "业务异常";

    public BizException(String message) {
        this.message = message;
    }

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


}
