From: Michal Lomnicki Date: 2006-03-05T17:52:34+09:00 Subject: Re: Sending mail when exception occured > Unless I completely misunderstood you, why not just do: > > begin > # Do whatever it is you're going to do > rescue Exception => e > # Create your email > message_string = "An error has occurred. Backtrace: #{e.backtrace}" > # Email it off however. > end > Of course it`s the simplest way, but I`ll have to invoke that in every rescue block. So, let`s say that there is _uncatched_ exception, even then mail should be sent. I redefined set_backtrace in Exception class. > I get the strange feeling though that you want more than this...? I hope that now my problem is clear. -- Posted via http://www.ruby-forum.com/.