From: Eric Hodel Date: 2011-01-25T16:25:08+09:00 Subject: Re: Does Ruby support exception wrapping (exception chaining)? On Jan 24, 2011, at 19:23, Ryan Heneise wrote: > To reraise the error and pass the original backtrace: > > begin > 1/0 > rescue Exception => e > raise $!, "Oh dear! #{$!}", $!.backtrace > end $ ri Exception.set_backtrace Exception.set_backtrace (from ruby core) ------------------------------------------------------------------------------ exc.set_backtrace(array) -> array ------------------------------------------------------------------------------ Sets the backtrace information associated with exc. The argument must be an array of String objects in the format described in Exception#backtrace.