begin
troubled_object.do_irritating_thing(:frequency => :irregularly)
rescue Object => ex
puts "#{ex.class}: #{ex.message}\n#{ex.backtrace.join($/)}"
end
Which is also the most concise way I know to generally evade Ruby's contraction of backtraces or the various backtrace trimming routines. I use it frequently enough that I keep a Kernel method snippet around for the odd times it gets too cumbersome.
But the other day it occurred to me, that especially for quick debugging there's an alternative approach:
troubled_objects_client.call_trouble rescue p $!