Permalink
Browse files

Better exception handling

This shows the backtrace when there is a problem with a watch action, makes for easier watch debugging
  • Loading branch information...
capotej committed Jun 22, 2011
1 parent 8c5be45 commit 673fa0eebcd721d4f48cf0d1e80acf79c6c7ef29
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/guard/watcher.rb
View
@@ -53,8 +53,8 @@ def match_file?(file)
def call_action(matches)
begin
@action.arity > 0 ? @action.call(matches) : @action.call
- rescue
- UI.error "Problem with watch action!"
+ rescue Exception => e
+ UI.error "Problem with watch action!\n#{e.message}\n\n#{e.backtrace}"
end
end

0 comments on commit 673fa0e

Please sign in to comment.