lib/cassanity/retry_strategies/retry_strategy.rb in cassanity-0.5.1 vs lib/cassanity/retry_strategies/retry_strategy.rb in cassanity-0.6.0.beta1

- old
+ new

@@ -8,11 +8,11 @@ def fail(attempts, last_error) raise 'not implemented' end # Public: execute the given block, and handle errors raised - # by the CassandraCQL driver. Call the retry method (overridden in your + # by the Cql::Client driver. Call the retry method (overridden in your # subclass) on each failed attempt with a current retry count and # the error raised by the block. # # payload - A Hash from an instrumenter to store a retry count in, or nil if # the number of retries shouldn't be tracked. @@ -23,13 +23,13 @@ while attempt += 1 begin payload[:attempts] = attempt unless payload.nil? return yield - rescue CassandraCQL::Error::InvalidRequestException, Thrift::Exception => e + rescue Cql::CqlError => e fail(attempt, e) end end end end end -end \ No newline at end of file +end