class Mechanize::ResponseCodeError

This error is raised when Mechanize encounters a response code it does not know how to handle. Currently, this exception will be thrown if Mechanize encounters response codes other than 200, 301, or 302. Any other response code is up to the user to handle.

Attributes

page[R]
response_code[R]

Public Class Methods

new(page) click to toggle source
# File lib/mechanize/response_code_error.rb, line 10
def initialize(page)
  @page          = page
  @response_code = page.code.to_s
end

Public Instance Methods

inspect() click to toggle source
Alias for: to_s
to_s() click to toggle source
# File lib/mechanize/response_code_error.rb, line 15
def to_s
  "#{@response_code} => #{Net::HTTPResponse::CODE_TO_OBJ[@response_code]}"
end
Also aliased as: inspect