package com.duiba.tuia.youtui.web.exception;

import com.duiba.tuia.youtui.web.constant.ErrorCode;

public class BusinessException extends Exception {
    private static final long serialVersionUID = 1L;

    private final String code;

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

    public BusinessException(ErrorCode errorCode) {
        super(errorCode.geteDesc());
        this.code = errorCode.geteCode();
    }

    public String getCode() {
        return code;
    }
}
