displaying all errors

E

Ell Quing

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

Logan Capaldo

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.

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

Daniel Sheppard

Is there some option I can use to display the "16 levels" of errors,=20
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 =3D> e
puts e.to_s
puts e.backtrace.join("\n")
end
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top