From: "Kru K." Date: 2010-10-14T23:46:36+09:00 Subject: Re: How to print FULL stacktrace of exception w/ line #? Michael Fellinger wrote in post #555437: > On 9/19/07, Andrew Chen wrote: >> The ruby interpreter prints out a full trace of the exception. >> >> However, all the expection I got is an one line message. I need to know >> where the exception happened in my code. I don't mind it is verbose. > > begin > .... > Math.sqrt (-1) > rescue => e > puts e.inspect > puts e.backtrace > ensure > andrew.brain << open("ri"){|ri| ri.read('Exception')} > end hahah :) nice one -- Posted via http://www.ruby-forum.com/.