Exception: XmlNodeStream::HttpError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/xml_node_stream/http_stream.rb

Overview

Error raised when an HTTP request returns an unsuccessful response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response = nil) ⇒ HttpError

Returns a new instance of HttpError.

Parameters:

  • message (String)

    the error message

  • response (Net::HTTPResponse, nil) (defaults to: nil)

    the HTTP response that caused the error



13
14
15
16
# File 'lib/xml_node_stream/http_stream.rb', line 13

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

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/xml_node_stream/http_stream.rb', line 9

def response
  @response
end