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.

Reported by nex3 · May 1st, 2008 @ 09:38 PM

State: resolved
Milestone: none
Assigned to: Pratik Pratik
Importance: none

Activity

  1. DHH
    DHH
    • Assigned user set to Pratik

    May 1st, 2008 @ 10:23 PM

  2. Pratik
    Pratik
    • State changed from new to resolved

    May 2nd, 2008 @ 10:46 AM