Closed mrLSD closed 7 years ago
After some investigation, I found this is because the description/display information of TemplateError
is missing when nested in TemplateFileError
. I'm going to fix this in handlebars side and include more information to the error data (sunng87/handlebars-rust#112)
Template error reporting received a few improvements in handlebars-rust 0.22. Please cargo update
you handlebars-iron to latest release and use println!("{}", e)
for detailed error information (Template name, line number, column number and error message). Both template error and render error are covered.
Currently, mistakes at the templates syntax really dangerous zone.
For example:
And for example template with wrong helper name:
mytemplate.hbs
Compilation successful. I tried run:
thread 'main' panicked at '"TemplateError"', src/middleware/render.rs:50
I suggesting extremely improve error reporting, for example:
Same for any other template errors.
My reasons: