Preventing the ugliness where the TemplateException stack trace shows the same typically several lines long error message twice: once at the top, and then again in the Java stack trace part.