if (e.getNestedException() != null) {
e.getNestedException().printStackTrace();
}
if (e.getNestedException() instanceof TemplateException) {
TemplateException te = (TemplateException) e.getNestedException();
if (log.isDebugEnabled()) {
log.error("Template Exception = " + te);
log.error("Nested Exception = " + te.getNestedException());
}
}
throw e;
}
}