Class WWW::Mechanize::ResponseCodeError
In: lib/mechanize/errors.rb
Parent: RuntimeError
Mechanize\n[lib/mechanize.rb\nlib/mechanize/cookie.rb\nlib/mechanize/errors.rb\nlib/mechanize/form.rb\nlib/mechanize/form_elements.rb\nlib/mechanize/history.rb\nlib/mechanize/list.rb\nlib/mechanize/page.rb\nlib/mechanize/page_elements.rb\nlib/mechanize/pluggable_parsers.rb] lib/mechanize.rb WWW dot/m_19_0.png

Synopsis

This error is thrown 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.

Methods

inspect   new   to_s  

Attributes

page  [R] 
response_code  [R] 

Public Class methods

[Source]

    # File lib/mechanize/errors.rb, line 25
25:       def initialize(page)
26:         @page          = page
27:         @response_code = page.code
28:       end

Public Instance methods

[Source]

    # File lib/mechanize/errors.rb, line 34
34:       def inspect; to_s; end

[Source]

    # File lib/mechanize/errors.rb, line 30
30:       def to_s
31:         "#{response_code} => #{Net::HTTPResponse::CODE_TO_OBJ[response_code]}"
32:       end

[Validate]