hi!
browsing through the ruby documentation(http://www.ruby-doc.org/core/),
i noticed that there was no info on which errors might be thrown by a
method.
since error/exception handling is necessary for coding robust programs,
i believe there must be a more detailed ruby documentation/reference.
where can i find a document that includes this info?
cheers, chris
i just noticed that there are some notes on errors raise, but some
functions that i expect to throw an error, f.i. copy_file, don’t.
how come there’s not an IOError or something like it?
On 9/25/06, Chris D. [email protected] wrote:
i just noticed that there are some notes on errors raise, but some
functions that i expect to throw an error, f.i. copy_file, don’t.
how come there’s not an IOError or something like it?
In that particular case, you’ll likely encounter Errno::* exceptions.
For a list of (core) defined exceptions, see Programming Ruby, or Ruby
QuickRef.
Or, require all the libs, and use ObjectSpace.each_object(Exception) {
|e| puts e.name }
That will obviously not give you info on what will a particular method
raise, just what exceptions are there.
J.
thx jan, i’ll have a look at it.
i still believe it would be better to have this information included in
each method description since it really shouldn’t take more than a few
seconds to look it up. =)
cheers, chris