# Displaying all errors

**URL:** <https://www.ruby-forum.com/t/displaying-all-errors/98725>\
**Category:** Ruby\
**Created:** [July 17, 2006, 8:04pm UTC](https://www.ruby-forum.com/t/displaying-all-errors/98725 "2006-07-17T20:04:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![the-companion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e47774/32.png) [@the-companion](https://www.ruby-forum.com/u/the-companion)\
**Post date:** [July 17, 2006, 8:04pm UTC](https://www.ruby-forum.com/t/displaying-all-errors/98725/1 "2006-07-17T20:04:34Z")

</div>

When running a program from the command-line, I get the following  
errors:  
from /usr/local/lib/site\_ruby/1.8/wordnet/lexicon.rb:211:in  
`lookupSynsetsByKey' from /usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:209:in`each’  
from /usr/local/lib/site\_ruby/1.8/wordnet/lexicon.rb:209:in  
`lookupSynsetsByKey' from /usr/local/lib/site_ruby/1.8/wordnet/synset.rb:876:in`fetchSynsetPointers’  
from /usr/local/lib/site\_ruby/1.8/wordnet/synset.rb:870:in  
`collect' from /usr/local/lib/site_ruby/1.8/wordnet/synset.rb:870:in`fetchSynsetPointers’  
from /usr/local/lib/site\_ruby/1.8/wordnet/synset.rb:869:in  
`synchronize' from /usr/local/lib/site_ruby/1.8/wordnet/synset.rb:869:in`fetchSynsetPointers’  
… 16 levels…  
from ./ruby\_src/wordnet/rwfinder.rb:29:in `each' from ./ruby_src/wordnet/rwfinder.rb:29:in`find\_related\_words’  
from ruby\_src/inference/xvo\_qa.rb:101:in `find\_answer’  
from ruby\_src/inference/xvo\_qa.rb:170

Is there some option I can use to display the “16 levels” of errors,  
instead of having them hidden? Thanks.

---

<div class="post-metadata">

**Author:** ![the-companion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e47774/32.png) [@the-companion](https://www.ruby-forum.com/u/the-companion)\
**Post date:** [July 18, 2006, 3:31am UTC](https://www.ruby-forum.com/t/displaying-all-errors/98725/2 "2006-07-18T03:31:50Z")

</div>

On Jul 17, 2006, at 2:04 PM, Ell Q. wrote:

> ```
> from /usr/local/lib/site_ruby/1.8/wordnet/synset.rb:870:in
> from ruby_src/inference/xvo_qa.rb:101:in `find_answer'
> from ruby_src/inference/xvo_qa.rb:170
> 
> ```
> 
> Is there some option I can use to display the “16 levels” of errors,  
> instead of having them hidden? Thanks.
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

That’s one error and a stack trace for said error. Whatever it was it  
happened in /usr/local/lib/site\_ruby/1.8/wordnet/lexicon.rb on line  
211 but it was probably caused by some code in ruby\_src/inference/  
xvo\_qa.rb at or around line 170. The middle stuff likely had nothing  
to do with the exception (which is why ruby omitted it from the stack  
trace).

---

<div class="post-metadata">

**Author:** ![the-companion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e47774/32.png) [@the-companion](https://www.ruby-forum.com/u/the-companion)\
**Post date:** [July 18, 2006, 4:46am UTC](https://www.ruby-forum.com/t/displaying-all-errors/98725/3 "2006-07-18T04:46:16Z")

</div>

> Is there some option I can use to display the “16 levels” of errors,  
> instead of having them hidden? Thanks.

If you explicitely catch the error, you can get to it through the  
backtrace method:

begin  
#do stuff  
rescue =\> e  
puts e.to\_s  
puts e.backtrace.join("\n")  
end
