OLD repository: Please see http://github.com/twitter4r/twitter4r-core for latest official repository for project.Twitter4R: The most Ruby-like bindings for the Twitter.com REST API by a long way. (Anyone want to take over? I don't have time for Ruby OSS projects any more)
So that developers can use different rescue blocks (instead of a case statement within a rescue block) to know how to process the exception.
Exception subclasses of @Twitter::RESTError@ should include:
@Twitter::ForbiddenRESTError@ for 401 HTTP responses
@Twitter::UnauthorizedRESTError@ for 403 HTTP responses
@Twitter::ServerRESTError@ for 500 HTTP responses
@Twitter::UnavailableRESTError@ for 503 HTTP responses
I should also add the following convenience method on @Twitter::RESTError@:
*@.from_status_code(status_code)@ which will return the corresponding exception class for the given @status_code@. e.g. @Twitter::RESTError.from_status_code(500)@ will return @Twitter::ServerRESTError@.
So that developers can use different rescue blocks (instead of a case statement within a rescue block) to know how to process the exception.
Exception subclasses of @Twitter::RESTError@ should include: @Twitter::ForbiddenRESTError@ for 401 HTTP responses @Twitter::UnauthorizedRESTError@ for 403 HTTP responses @Twitter::ServerRESTError@ for 500 HTTP responses @Twitter::UnavailableRESTError@ for 503 HTTP responses
I should also add the following convenience method on @Twitter::RESTError@: *@.from_status_code(status_code)@ which will return the corresponding exception class for the given @status_code@. e.g. @Twitter::RESTError.from_status_code(500)@ will return @Twitter::ServerRESTError@.