fix coffeescript compile error exceptions

This commit is contained in:
John Bintz 2011-06-17 10:27:00 -04:00
parent cff6891a8d
commit 7c37c80a9a
2 changed files with 6 additions and 2 deletions

View File

@ -11,5 +11,9 @@ $:.unshift(File.join(gem_dir, 'lib'))
puts "Running Jasmine specs..."
require 'jasmine/headless/cli'
begin
exit Jasmine::Headless::CLI.run
rescue StandardError => e
exit 1
end

View File

@ -76,7 +76,7 @@ module Jasmine
CoffeeScript.compile(fh = File.open(file))
rescue CoffeeScript::CompilationError => ne
puts "[%s] %s: %s" % [ 'coffeescript'.color(:red), file.color(:yellow), ne.message.to_s.color(:white) ]
exit 1
raise ne
ensure
fh.close
end