package com.ssyf.common.web.error;

/**
* 业务中断异常
* @author huwei
* @date 2022/7/5 15:39
*/
public class ServiceException extends Exception  implements ServiceError{

    private String code;

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

    public static ServiceException instance(String code , String message){
        return new ServiceException(code, message);
    }

    public static ServiceException throw0(String code , String message) throws ServiceException {
        throw instance(code ,message);
    }

    @Override
    public String getCode() {
        return null;
    }
}
