Parent

Included Modules

Twitter::RESTError

Exception API base class raised when there is an error encountered upon querying or posting to the remote Twitter REST API.

To consume and query any RESTError raised by Twitter4R:

 begin
   # Do something with your instance of <tt>Twitter::Client</tt>.
   # Maybe something like:
   timeline = twitter.timeline_for(:public)
 rescue RESTError => re
   puts re.code, re.message, re.uri
 end

Which on the code raising a RESTError will output something like:

 404
 Resource Not Found
 /i_am_crap.json

Attributes

code[RW]
message[RW]
uri[RW]
error[RW]

Public Class Methods

register(status_code) click to toggle source
     # File lib/twitter/core.rb, line 110
110:       def register(status_code)
111:         @@REGISTRY[status_code] = self
112:       end
registry() click to toggle source
     # File lib/twitter/core.rb, line 106
106:       def registry
107:         @@REGISTRY
108:       end

Public Instance Methods

to_s() click to toggle source

Returns string in following format:

 "HTTP #{@code}: #{@message} at #{@uri}"

For example,

 "HTTP 404: Resource Not Found at /i_am_crap.json
    >This is the error message sent back by the Twitter.com API"
     # File lib/twitter/core.rb, line 124
124:     def to_s
125:       "HTTP #{@code}: #{@message} at #{@uri}"
126:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.