package com.oguerreiro.resilient.error;

public class OutputExpressionNullResultRuntimeException extends ResilientRuntimeException {
  private static final String CODE = "E016";

  public OutputExpressionNullResultRuntimeException(String outputVariableCode, String organizationCode, String period,
      String periodVersion, String expression) {
    super("The expression evaluation resulted in null value: Variable Code [" + outputVariableCode
        + "], Organization Code [" + organizationCode + "], Period [" + period + "], Period Version [" + periodVersion
        + "], Expression [" + expression + "]. ");

    addMessageArg(outputVariableCode);
    addMessageArg(organizationCode);
    addMessageArg(period);
    addMessageArg(periodVersion);
    addMessageArg(expression);
  }

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

}
