Permalink
Browse files

synchrony Adapter#execute should raise exception on errors

  • Loading branch information...
1 parent f55e60f commit 6d8193bc532be480943a8a9b02b44dc22044bcba @deepfryed deepfryed committed Apr 21, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/swift/synchrony.rb
View
@@ -5,7 +5,10 @@ module Swift
class Adapter
alias :aexecute :execute
def execute *args
- EM::Synchrony.sync aexecute(*args)
+ res = EM::Synchrony.sync aexecute(*args)
+ raise res if res.kind_of?(SwiftError)
+ yield res if block_given?
+ res
end
end
end

0 comments on commit 6d8193b

Please sign in to comment.