This project is archived and is in readonly mode.

#5238 ✓resolved
Akira Matsuda

ShowExceptions middleware causes TypeError while logging a template error

Reported by Akira Matsuda | July 29th, 2010 @ 07:22 AM | in 3.0.2

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.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket