Lighthouse has a new layout.
Prefer the old one? Return to the old layout,
and switch back any time from the link at the top of each page.
This project is archived and is in readonly mode.
Errors in partials are reported as occurring in parent templates
#89
When an error is raised in a partial template, it's only wrapped by TemplateError once it bubbles up to Base#render_file. This means that the Template object passed to TemplateError.new is the toplevel object rather than the PartialTemplate object. Since TemplateError uses this object to figure out the filename and line number of the error, the error message is entirely wrong.
This patch fixes this by delegating error-catching responsibilities to the Template object. This means that each Template will wrap its own errors at the proper time.