Exception: ActiveCouch::ConnectionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_couch/connection.rb

Overview

:nodoc:

Direct Known Subclasses

ClientError, Redirection, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, message = nil) ⇒ ConnectionError

Returns a new instance of ConnectionError.



12
13
14
15
# File 'lib/active_couch/connection.rb', line 12

def initialize(response, message = nil)
  @response = response
  @message  = message
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



10
11
12
# File 'lib/active_couch/connection.rb', line 10

def response
  @response
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/active_couch/connection.rb', line 17

def to_s
  "Failed with #{response.code} #{response.message if response.respond_to?(:message)}"
end