Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improve nested excepting handling

  • Loading branch information...
commit dfbea65100904f457cf12bf4953c9de5dc0bc01d 1 parent 59619c4
Ryan LeCompte authored
Showing with 7 additions and 3 deletions.
  1. +4 −0 Changes.md
  2. +3 −3 lib/redis_failover/node.rb
4 Changes.md
View
@@ -1,3 +1,7 @@
+HEAD
+-----------
+- Improve nested exception handling.
+
0.9.0
-----------
- Make Node Manager's lock path vary with its main znode. (Bira)
6 lib/redis_failover/node.rb
View
@@ -175,14 +175,14 @@ def perform_operation
redis = new_client
yield redis
end
- rescue
- raise NodeUnavailableError, self, caller
+ rescue => ex
+ raise NodeUnavailableError, "#{ex.class}: #{ex.message}", ex.backtrace
ensure
if redis
begin
redis.client.disconnect
rescue
- raise NodeUnavailableError, self, caller
+ raise NodeUnavailableError, "#{ex.class}: #{ex.message}", ex.backtrace
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.