Class: RedisClient::Cluster::CommandErrorCollection
- Inherits:
-
Error
- Object
- Error
- RedisClient::Cluster::CommandErrorCollection
- Defined in:
- lib/redis_client/cluster/errors.rb
Overview
Raised when error occurs on any node of cluster.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors) ⇒ CommandErrorCollection
constructor
A new instance of CommandErrorCollection.
Constructor Details
#initialize(errors) ⇒ CommandErrorCollection
Returns a new instance of CommandErrorCollection.
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/redis_client/cluster/errors.rb', line 35 def initialize(errors) @errors = {} if !errors.is_a?(Hash) || errors.empty? super('') return end @errors = errors = @errors.map { |node_key, error| "#{node_key}: #{error.}" } super("Command errors were replied on any node: #{.join(', ')}") end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
33 34 35 |
# File 'lib/redis_client/cluster/errors.rb', line 33 def errors @errors end |