Exception: RediPress::ConfigurationFailed

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/redipress/errors.rb

Overview

A RuntimeError subclass for when a configuration fails.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration, error) ⇒ ConfigurationFailed

Returns a new instance of ConfigurationFailed.



41
42
43
44
# File 'lib/redipress/errors.rb', line 41

def initialize(configuration, error)
  @configuration = configuration
  @error = error
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



39
40
41
# File 'lib/redipress/errors.rb', line 39

def configuration
  @configuration
end

#errorObject (readonly)

Returns the value of attribute error.



39
40
41
# File 'lib/redipress/errors.rb', line 39

def error
  @error
end

Instance Method Details

#to_sObject



46
47
48
# File 'lib/redipress/errors.rb', line 46

def to_s
  "The configuration '#{@configuration.name}' failed: #{@error}"
end