Exception: Matterhorn::HttpGeneralError

Inherits:
Error
  • Object
show all
Defined in:
lib/matterhorn/error.rb

Direct Known Subclasses

HttpClientError, HttpServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

format_message

Constructor Details

#initialize(request, response) ⇒ HttpGeneralError

Returns a new instance of HttpGeneralError.



15
16
17
18
19
# File 'lib/matterhorn/error.rb', line 15

def initialize(request, response)
  @request  = request
  @response = response
  @code     = response.code.to_i
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



13
14
15
# File 'lib/matterhorn/error.rb', line 13

def code
  @code
end

#requestObject (readonly)

Returns the value of attribute request.



13
14
15
# File 'lib/matterhorn/error.rb', line 13

def request
  @request
end

#responseObject (readonly)

Returns the value of attribute response.



13
14
15
# File 'lib/matterhorn/error.rb', line 13

def response
  @response
end