package com.oguerreiro.resilient.error;

public class ExpressionEvaluationException extends ResilientException {
  private static final String CODE = "E008";

  public ExpressionEvaluationException(String expression, Throwable cause) {
    super("An error occurred evaluating the expression: [" + expression + "]. With the following error: "
        + cause.getMessage());

    addMessageArg(expression);
    addMessageArg(cause.getMessage());
  }

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

}
