# Error/exception documentation

**URL:** <https://www.ruby-forum.com/t/error-exception-documentation/69921>\
**Category:** Ruby\
**Created:** [September 25, 2006, 4:42pm UTC](https://www.ruby-forum.com/t/error-exception-documentation/69921 "2006-09-25T16:42:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 25, 2006, 4:42pm UTC](https://www.ruby-forum.com/t/error-exception-documentation/69921/1 "2006-09-25T16:42:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 25, 2006, 5:22pm UTC](https://www.ruby-forum.com/t/error-exception-documentation/69921/2 "2006-09-25T17:22:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 25, 2006, 5:57pm UTC](https://www.ruby-forum.com/t/error-exception-documentation/69921/3 "2006-09-25T17:57:03Z")

</div>

On 9/25/06, Chris D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 25, 2006, 6:41pm UTC](https://www.ruby-forum.com/t/error-exception-documentation/69921/4 "2006-09-25T18:41:17Z")

</div>

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
