Better exception handling

This shows the backtrace when there is a problem with a watch action, makes for easier watch debugging
This commit is contained in:
Julio Capote 2011-06-22 16:47:12 -07:00
parent 8c5be4536b
commit 673fa0eebc

View File

@ -53,8 +53,8 @@ module Guard
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