Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
When using eval and inner method throws exception, this exception gets completely lost and is not found in stack trace.
The problem is in method BuiltinsForStringsMisc.java (eg. https://www.programcreek.com/java-api-examples/index.php?source_dir=freemarker-old-master/src/main/java/freemarker/core/BuiltInsForStringsMisc.java):
try { return exp.eval(env); } catch (TemplateException e) { throw new _MiscTemplateException(this, env, "Failed to \"?", key, "\" string with this error:\n\n", MessageUtil.EMBEDDED_MESSAGE_BEGIN, new _DelayedGetMessageWithoutStackTop(e), MessageUtil.EMBEDDED_MESSAGE_END, "\n\nThe failing expression:"); }
The caught exception is not logged, nor passed to the new exception.