Permalink
Browse files

Use correct error classes

  • Loading branch information...
1 parent 4d04524 commit b2615ab6a3d0c1fd2cb70a909a37b1b26bd1c819 @Sutto committed Jun 2, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/barista/compiler.rb
View
@@ -133,10 +133,10 @@ def compile(script, where = 'inline')
Barista.invoke_hook :compiled, where
end
out
- rescue CoffeeScript::Error => e
+ rescue ExecJS::Error => e
Barista.invoke_hook :compilation_failed, where, e.message
if Barista.exception_on_error? && !@options[:silence]
- if e.is_a?(CoffeeScript::CompilationError)
+ if e.is_a?(ExecJS::ProgramError)
where_within_app = where.sub(/#{Regexp.escape(Barista.app_root.to_s)}\/?/, '')
raise CompilationError, "Error: In #{where_within_app}, #{e.message}"
else

0 comments on commit b2615ab

Please sign in to comment.