use of org.dbflute.exception.DfTemplateParsingException in project dbflute-core by dbflute.
the class DfFlutistGenerator method throwTemplateParsingException.
protected void throwTemplateParsingException(String inputTemplate, String specifiedInputEncoding, Throwable e) {
rethrowIfNestedException(inputTemplate, specifiedInputEncoding, e);
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("Failed to parse the input template.");
br.addItem("Input Template");
br.addElement(inputTemplate + " (" + specifiedInputEncoding + ")");
final Throwable cause;
if (e instanceof MethodInvocationException) {
cause = ((MethodInvocationException) e).getWrappedThrowable();
} else {
cause = e;
}
final String msg = br.buildExceptionMessage();
throw new DfTemplateParsingException(msg, cause);
}
Aggregations