Details
Description
I use freemarker and dependencies in separate jars.
I haven't 'velocity' in my classpath.
So I found bug: common click core depends on Velocity.
Namely:
org.apache.click.ClickServlet.java
org.apache.click.util.ErrorReport.java
They both depend on
org.apache.velocity.exception.ParseErrorException (search:
instanceof ParseErrorException)
and require Velocity be present in classpath even if freemarker are used.
My workaround:
I made fake public class ParseErrorException extends Exception {}.
But you can make generic solution, for example:
TemplateService
+ boolean isParseErrorException (Exception e)
+ Map<String, Object> describeParseErrorException (Exception e)
or your own ClickTemplateException to wrap low level velocity/freemarker exceptions.