Skip to content
This repository
Browse code

Better exception handling

This shows the backtrace when there is a problem with a watch action, makes for easier watch debugging
  • Loading branch information...
commit 673fa0eebcd721d4f48cf0d1e80acf79c6c7ef29 1 parent 8c5be45
Julio Capote capotej authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 lib/guard/watcher.rb
4 lib/guard/watcher.rb
@@ -53,8 +53,8 @@ def match_file?(file)
53 53 def call_action(matches)
54 54 begin
55 55 @action.arity > 0 ? @action.call(matches) : @action.call
56   - rescue
57   - UI.error "Problem with watch action!"
  56 + rescue Exception => e
  57 + UI.error "Problem with watch action!\n#{e.message}\n\n#{e.backtrace}"
58 58 end
59 59 end
60 60

0 comments on commit 673fa0e

Please sign in to comment.
Something went wrong with that request. Please try again.