package com.banesco.common.application.exception;

public class BanBackendException extends RuntimeException {

    protected String backendCode;
    protected String backendDesc;
    protected String target;

    public BanBackendException(String backendCode, String backendDesc) {
        super(backendDesc);
        this.backendCode = backendCode;
        this.backendDesc = backendDesc;
    }

    public BanBackendException(String backendCode, String backendDesc, String target) {
        super(backendDesc.formatted(target) + ", Target:" + target);
        this.backendCode = backendCode;
        this.backendDesc = backendDesc;
        this.target = target;
    }

    public String getBackendCode() {
        return backendCode;
    }

    public String getBackendDesc() {
        return backendDesc;
    }

    public String getTarget() {
        return target;
    }
}
