package com.oguerreiro.resilient.error;

public class InventoryImportVariableUnitConverterNotFoundException extends ResilientException {
	private static final String CODE = "E006";
	
	public InventoryImportVariableUnitConverterNotFoundException(String sheetName, int row, String variableCode, String fromUnitCode, String toUnitCode) {
		super("Sheet [" + sheetName + "]; Row[" + row + "]; Variable Code [" + variableCode + "]; A unit convertion is needed, but no converter is configured to convert the value from the unit [" + fromUnitCode + "] in the unit [" + toUnitCode + "].");
		
		addMessageArg(sheetName);
		addMessageArg(row);
		addMessageArg(variableCode);
		addMessageArg(fromUnitCode);
		addMessageArg(toUnitCode);
	}
	
	@Override
	public String getMessageCode() {
		return CODE;
	}

}
