Say, I’m having a difficult problem getting a complete trace/stack dump.
I’ve
got a place where I do a rescue Exception for anything, and I get the
darn raise
string, but not a trace back to the line where it occurred. In fact it
appears
my use of rescue is hiding the information I might get otherwise. Can
someone
give me some suggestions. My apologies if this should be obvious.
On Tue, Jun 30, 2009 at 07:38:22AM +0900, Xeno C. wrote:
Say, I’m having a difficult problem getting a complete trace/stack dump.
I’ve got a place where I do a rescue Exception for anything, and I get
the darn raise string, but not a trace back to the line where it
occurred. In fact it appears my use of rescue is hiding the information
I might get otherwise. Can someone give me some suggestions. My
apologies if this should be obvious.
Is Exception#backtrace what you’re looking for?
From the RDoc:
def a
raise “boom”
end
def b
a()
end
begin
b()
rescue => detail
print detail.backtrace.join("\n")
end
On Tue, Jun 30, 2009 at 07:38:22AM +0900, Xeno C. wrote:
Say, I’m having a difficult problem getting a complete trace/stack dump.
I’ve got a place where I do a rescue Exception for anything, and I get
the darn raise string, but not a trace back to the line where it
occurred. In fact it appears my use of rescue is hiding the information
I might get otherwise. Can someone give me some suggestions. My
apologies if this should be obvious.
Is Exception#backtrace what you’re looking for?
Yes, thank you very much. That helped. I would have responded sooner,
but this
week’s death march and all you know.
Thanks.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.