From: Gennady Date: 2003-07-03T06:54:24+09:00 Subject: Re: More error backtrace Typo correction: rescure -> rescue ----- Original Message ----- From: "Gennady" To: "ruby-talk ML" Sent: Wednesday, July 02, 2003 2:51 PM Subject: Re: More error backtrace > It is the default exception handling in Ruby. You can always embrace your > program > in > > begin > ... > rescure Exception => exception > p exception.message > p exception.backtrace # or present it in any other way you like > end > > Gennady > > ----- Original Message ----- > From: "Nigel Gilbert" > To: "ruby-talk ML" > Sent: Wednesday, July 02, 2003 2:43 PM > Subject: More error backtrace > > > > I am having trouble tracking down the point at which my program is > > failing. I have a backtrace that looks like this: > > > > /usr/local/lib/ruby/1.6/net/protocol.rb:468:in `new': wrong argument > > type nil (expected String) (TypeError) > > from /usr/local/lib/ruby/1.6/net/protocol.rb:468:in `connect' > > from /usr/local/lib/ruby/1.6/net/protocol.rb:467:in `timeout' > > from /usr/local/lib/ruby/1.6/net/protocol.rb:467:in `connect' > > from /usr/local/lib/ruby/1.6/net/protocol.rb:449:in `initialize' > > from /usr/local/lib/ruby/1.6/net/protocol.rb:149:in `new' > > from /usr/local/lib/ruby/1.6/net/protocol.rb:149:in > > `conn_socket' > > from /usr/local/lib/ruby/1.6/net/http.rb:499:in `do_start' > > from /usr/local/lib/ruby/1.6/net/protocol.rb:131:in `start' > > ... 6 levels... > > from webcount.rb:556:in `each' > > from webcount.rb:556:in `wayback' > > from webcount.rb:703:in `dosite' > > from webcount.rb:813 > > > > What I need to know are which lines of code are represented by "... 6 > > levels...". Is there any way of stopping ruby from abbreviating the > > backtrace like this? > > > > (I'm using ruby 1.6.8 (2002-12-24) [powerpc-darwin6.6]) > > > > Thanks > > > > Nigel > > > > > > > > >