From: Joao Pedrosa Date: 2003-06-20T02:02:05+09:00 Subject: Re: rescue + stack trace Hi, [dewd@localhost dewd]$ irb irb(main):001:0> begin irb(main):002:1* i = 10/0 irb(main):003:1> rescue => e irb(main):004:1> puts "#{e.message}\n#{e.backtrace}" irb(main):005:1> end divided by 0 (irb):2:in `/'(irb):2:in `irb_binding'/usr/local/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'/usr/local/lib/ruby/1.8/irb/workspace.rb:52 => nil Cheers, Joao Em Qui, 2003-06-19 às 13:55, Orion Hunter escreveu: > I am working on debugging a program. I understand how to raise/rescue > exceptions, and how to capture the standard error messages as well as > provide my own. > > However, I do not know how to capture the stack trace. Is there a variable > (like the $! variable for the error message), which contains a reference to > the stack trace that I would get if I were not catching these errors? > Thanks. > > Matt > > _________________________________________________________________ > Add photos to your messages with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > >