lib/redis_failover/errors.rb in redis_failover-0.9.4 vs lib/redis_failover/errors.rb in redis_failover-0.9.5

- old
+ new

@@ -23,9 +23,16 @@ # Raised when no master is currently available. class NoMasterError < Error end + # Raised when more than one master is found on startup. + class MultipleMastersError < Error + def initialize(nodes) + super("Multiple nodes with master role: #{nodes.map(&:to_s)}") + end + end + # Raised when no slave is currently available. class NoSlaveError < Error end # Raised when a redis server is no longer using the same role