Exception: Mechanize::ResponseReadError
- Defined in:
- lib/mechanize/response_read_error.rb
Overview
Raised when Mechanize encounters an error while reading the response body from the server. Contains the response headers and the response body up to the error along with the initial error.
Instance Attribute Summary collapse
-
#body_io ⇒ Object
readonly
Returns the value of attribute body_io.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(error, response, body_io) ⇒ ResponseReadError
constructor
Creates a new ResponseReadError with the
error
raised, theresponse
and thebody_io
for content read so far. -
#message ⇒ Object
:nodoc:.
Constructor Details
#initialize(error, response, body_io) ⇒ ResponseReadError
Creates a new ResponseReadError with the error
raised, the response
and the body_io
for content read so far.
16 17 18 19 20 |
# File 'lib/mechanize/response_read_error.rb', line 16 def initialize error, response, body_io @error = error @response = response @body_io = body_io end |
Instance Attribute Details
#body_io ⇒ Object (readonly)
Returns the value of attribute body_io.
8 9 10 |
# File 'lib/mechanize/response_read_error.rb', line 8 def body_io @body_io end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
9 10 11 |
# File 'lib/mechanize/response_read_error.rb', line 9 def error @error end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
10 11 12 |
# File 'lib/mechanize/response_read_error.rb', line 10 def response @response end |
Instance Method Details
#message ⇒ Object
:nodoc:
22 23 24 |
# File 'lib/mechanize/response_read_error.rb', line 22 def # :nodoc: "#{@error.} (#{self.class})" end |