package com.oguerreiro.resilient.error;

public class InventoryImportVariableUnitConverterFormulaException extends ResilientException {
  private static final String CODE = "E010";

  public InventoryImportVariableUnitConverterFormulaException(String sheetName, int row, String variableCode,
      String fromUnitCode, String toUnitCode, String formula) {
    super("Sheet [" + sheetName + "]; Row[" + row + "]; Variable Code [" + variableCode
        + "]; Unit convertion formula exception to convert the value from the unit [" + fromUnitCode + "] in the unit ["
        + toUnitCode + "], with formula [" + formula + "].");

    addMessageArg(sheetName);
    addMessageArg(row);
    addMessageArg(variableCode);
    addMessageArg(fromUnitCode);
    addMessageArg(toUnitCode);
    addMessageArg(formula);
  }

  @Override
  public String getMessageCode() {
    return CODE;
  }

}