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.

ShowExceptions middleware causes TypeError while logging a template error

#5238

While the template returns an error with annoteted_source_code in nil, the error_log handler throws yet another error inside, and ends in 500.

Here's a tiny scenario to reproduce the bug.

gem 'haml'
and bundle, then create a simple Haml view throwing a Ruby syntax error, like this.
- else
Then start your server and send a request.
Firstly, Haml throws an error with nil annoteted_source_code, next ShowExceptions middleware catches the error, then finally ShowExceptions middleware abends by being trapped in a TypeError.

Here's a patch not to cause a TypeError when annoteted_source_code is nil.

Reported by Akira Matsuda · July 29th, 2010 @ 07:22 AM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. José Valim
    José Valim
    • Milestone cleared.
    • State changed from new to resolved
    • Assigned user set to José Valim
    • Importance changed from to Low

    This was fixed some time ago in master already, thanks!

    August 23rd, 2010 @ 01:23 AM

  2. Jeremy Kemper