class Mechanize::ResponseReadError
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.
Attributes
Public Class Methods
Source
# File lib/mechanize/response_read_error.rb, line 19 def initialize error, response, body_io, uri, mechanize @body_io = body_io @error = error @mechanize = mechanize @response = response @uri = uri end
Creates a new ResponseReadError with the error raised, the response and the body_io for content read so far.
Public Instance Methods
Source
# File lib/mechanize/response_read_error.rb, line 30 def force_parse @mechanize.parse @uri, @response, @body_io end
Converts this error into a Page, File, etc. based on the content-type