Don't catch CoffeeScript errors when in build mode. Fixes #551

This commit is contained in:
Thomas Reynolds 2012-07-25 11:21:07 -07:00
parent 2f7371ca1f
commit 6ccf5e2db0
3 changed files with 9 additions and 1 deletions

View file

@ -1,6 +1,7 @@
Master
===
* Don't catch CoffeeScript errors when in build mode.
* Extract load_paths so they aren't locked into the binary
* Add middleman/rack for better config.ru support
* Use centralized Logger and add benchmark methods

View file

@ -29,6 +29,8 @@ module Middleman
# @param [Hash] locals
# @return [String]
def evaluate(context, locals, &block)
return super if context.build?
begin
super
rescue ::ExecJS::RuntimeError => e

View file

@ -14,4 +14,9 @@ Feature: Support coffee-script
Scenario: Rendering broken coffee
Given the Server is running at "coffeescript-app"
When I go to "/javascripts/broken-coffee.js"
Then I should see "reserved word"
Then I should see "reserved word"
Scenario: Building broken coffee
Given a built app at "coffeescript-app"
Then the output should contain "error build/javascripts/broken-coffee.js"
And the exit status should be 1