Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Catch StandardError instead of ExecJS errors.

  • Loading branch information...
commit 3b214da3b22b0c35062dfa087b2f9b98819cc2be 1 parent d4df53d
Michael Kessler netzpirat authored
Showing with 1 addition and 6 deletions.
  1. +0 −2  lib/guard/coffeescript.rb
  2. +1 −4 lib/guard/coffeescript/runner.rb
2  lib/guard/coffeescript.rb
View
@@ -93,8 +93,6 @@ def run_on_deletion(paths)
# @param [Array<String>] changed_files the files that have been changed
#
def notify(changed_files)
- return if !changed_files || changed_files.empty?
-
::Guard.guards.each do |guard|
paths = Watcher.match_files(guard, changed_files)
guard.run_on_change paths unless paths.empty?
5 lib/guard/coffeescript/runner.rb
View
@@ -26,9 +26,6 @@ def run(files, watchers, options = { })
notify_result(changed_files, errors, options)
[changed_files, errors.empty?]
-
- rescue ExecJS::RuntimeError => e
- Formatter.error("ExecJS engine error: " + e.message)
end
private
@@ -61,7 +58,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 => e
error_message = file + ': ' + e.message.to_s
errors << error_message
Formatter.error(error_message)
Please sign in to comment.
Something went wrong with that request. Please try again.