Skip to content

Loading…

Better exception handling #93

Merged
merged 2 commits into from

2 participants

@capotej

This shows the backtrace when there is a problem with a watch action, makes for easier watch debugging

capotej added some commits
@capotej capotej Better exception handling
This shows the backtrace when there is a problem with a watch action, makes for easier watch debugging
673fa0e
@capotej capotej Forgot to join the backtrace array with newlines for better output 8e91b5f
@thibaudgg
Guard member

Thanks!

@thibaudgg thibaudgg merged commit 5923cef into guard:master
@thibaudgg
Guard member

Oops it breaks the specs (http://travis-ci.org/#!/guard/guard/builds/29739), can you please fix it.

@thibaudgg
Guard member

Updating the changelog would be great too. :)

@capotej

No problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 22, 2011
  1. @capotej

    Better exception handling

    capotej committed
    This shows the backtrace when there is a problem with a watch action, makes for easier watch debugging
Commits on Jun 23, 2011
  1. @capotej
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/guard/watcher.rb
View
4 lib/guard/watcher.rb
@@ -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.join("\n")}"
end
end
Something went wrong with that request. Please try again.