From: Robert Klemme Date: 2009-09-26T04:25:15+09:00 Subject: Re: Full stracktrace in ruby 1.9 On 25.09.2009 16:40, Roger Pack wrote: > Freak Guard wrote: >> I'm getting stacktraces like: >> >> expected Foo, got #> >> but it would be way more useful to get the 6 levels. How to enable that >> globally? > > add this somewhere: > > > at_exit { > puts "==== " > puts $!.backtrace.join("\n") > puts "====" > } > > Though there are other options [1] > > http://github.com/rogerdpack/ruby_backtracer/blob/master/backtrace_nothing_swallowed.rb You could simply wrap the whole script or the offending region in begin rescue. robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/