infbio/haml_assets — pull request #15 by potatosalad (2012-09-07 21:17:01+00:00)
Title: Don't catch errors on evaluate

While working in development mode, whenever there's a syntax error or other exception in the haml code, it logs the exception and backtrace in the log file. Rails, however, generates a page that just says:

```
NoMethodError

undefined method `bytesize' for true:TrueClass
```

Allowing the exception to bubble up produces an exception page like the following:

```
SyntaxError

(haml):32: unknown type of %string
_hamlout.attributes({}, nil, %invalid )}>

\n";
^
(haml):32: syntax error, unexpected $end, expecting ')'
_hamlout.attributes({}, nil, %invalid )}>

\n";
^
(in [RAILS_ROOT]/app/assets/javascripts/views/users.html.haml)
```