Skip to content

Commit

Permalink
Catch all exceptions from compiling.
Browse files Browse the repository at this point in the history
This is a workaround for a problem with the latest ExecJS and The Ruby Racer,
where ExecJS leaks a NativeException: org.mozilla.javascript.JavaScriptException.
  • Loading branch information
netzpirat committed Sep 15, 2011
1 parent 5becb31 commit de6b924
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/guard/coffeescript/runner.rb
Expand Up @@ -61,7 +61,7 @@ def compile_files(files, watchers, options)
begin
content = compile(file, options)
changed_files << write_javascript_file(content, file, directory, options)
rescue ExecJS::ProgramError => e
rescue Exception => e
error_message = file + ': ' + e.message.to_s
errors << error_message
Formatter.error(error_message)
Expand Down

0 comments on commit de6b924

Please sign in to comment.