All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.jinjava.el.ext.DeferredParsingException Maven / Gradle / Ivy

There is a newer version: 2.7.3
Show newest version
package com.hubspot.jinjava.el.ext;

import com.hubspot.jinjava.interpret.DeferredValueException;

public class DeferredParsingException extends DeferredValueException {
  private final String deferredEvalResult;
  private final Object sourceNode;

  public DeferredParsingException(String message) {
    super(message);
    this.deferredEvalResult = message;
    this.sourceNode = null;
  }

  public DeferredParsingException(Object sourceNode, String deferredEvalResult) {
    super(
      String.format(
        "%s could not be parsed more than: %s",
        sourceNode.getClass(),
        deferredEvalResult
      )
    );
    this.deferredEvalResult = deferredEvalResult;
    this.sourceNode = sourceNode;
  }

  public String getDeferredEvalResult() {
    return deferredEvalResult;
  }

  public Object getSourceNode() {
    return sourceNode;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy