From: daz Date: 2003-07-05T15:22:45+09:00 Subject: Re: The best way to catch errors "Nigel Gilbert" wrote: > I've already discovered relevant exceptions defined in > http.rb, protocol.rb and timeout.rb, but there may be more. How can I > find a list of all the exceptions that could occur? > > Nigel > #------------------------------------------ require 'net/http' require 'net/protocol' require 'timeout' require ((.. this)) # http://www.rubygarden.org/ruby?ASCIIClassHierarchyGenerator class_tree(StandardError) #------------------------------------------ - StandardError | |- ArgumentError | |- IOError | | | `- EOFError | |- IndexError | |- LocalJumpError ............... exit_value | :.. reason | |- NameError .................... name | | | `- NoMethodError ................ args | |- Net::HTTPBadResponse | |- Net::HTTPHeaderSyntaxError | |- Net::ProtocolError | | | |- Net::HTTPError | | | |- Net::ProtoAuthError | | | |- Net::ProtoCommandError | | | |- Net::ProtoFatalError | | | | | `- Net::HTTPFatalError | | | |- Net::ProtoRetriableError | | | | | `- Net::HTTPRetriableError | | | |- Net::ProtoServerError | | | | | `- Net::HTTPServerException | | | |- Net::ProtoSyntaxError | | | `- Net::ProtoUnknownError | [snip] |- TypeError | |- URI::Error | | | |- URI::BadURIError | | | |- URI::InvalidComponentError | | | `- URI::InvalidURIError | `- ZeroDivisionError ---------------------------------------- ruby 1.8.0 (2003-06-23) [i586-bccwin32] daz