package com.lingyue.common.exception;

import lombok.Getter;

/**
 * 业务异常（已废弃，请使用 ServiceException）
 * @deprecated 使用 ServiceException 替代
 */
@Deprecated
@Getter
public class BusinessException extends RuntimeException {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 响应码
     */
    private final Integer code;
    
    /**
     * 错误详情
     */
    private final Object errorDetail;
    
    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
        this.errorDetail = null;
    }
    
    public BusinessException(Integer code, String message, Object errorDetail) {
        super(message);
        this.code = code;
        this.errorDetail = errorDetail;
    }
}

