package com.ycwl.basic.integration.common.exception;

import lombok.Getter;

@Getter
public class IntegrationException extends RuntimeException {
    private final Integer code;
    private final String serviceName;

    public IntegrationException(Integer code, String message) {
        super(message);
        this.code = code;
        this.serviceName = null;
    }

    public IntegrationException(Integer code, String message, String serviceName) {
        super(message);
        this.code = code;
        this.serviceName = serviceName;
    }

    public IntegrationException(Integer code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
        this.serviceName = null;
    }

    public IntegrationException(Integer code, String message, String serviceName, Throwable cause) {
        super(message, cause);
        this.code = code;
        this.serviceName = serviceName;
    }
}