BizException.java 431 Bytes
package com.xly.erp.common.exception;

import com.xly.erp.common.response.ErrorCode;
import lombok.Getter;

@Getter
public class BizException extends RuntimeException {
    private final int code;

    public BizException(ErrorCode ec) {
        super(ec.getMessage());
        this.code = ec.getCode();
    }

    public BizException(ErrorCode ec, String detail) {
        super(detail);
        this.code = ec.getCode();
    }
}