Displaying all errors

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:ineach’
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:infetchSynsetPointers’
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:infetchSynsetPointers’
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:infetchSynsetPointers’
… 16 levels…
from ./ruby_src/wordnet/rwfinder.rb:29:in each' from ./ruby_src/wordnet/rwfinder.rb:29:infind_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.

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/.

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).

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs