Caller usage and getting a full trace after a rescue on general Exception

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.

Sincerely, Xeno

···

--
They are the flesh. They are the bone.
They are the very cornerstone.

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 Campanoli 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.

--
Aaron Patterson
http://tenderlovemaking.com/

Aaron Patterson 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.

···

On Tue, Jun 30, 2009 at 07:38:22AM +0900, Xeno Campanoli wrote:

From the RDoc:

  def a
    raise "boom"
  end
    def b
    a()
  end
    begin
    b()
  rescue => detail
    print detail.backtrace.join("\n")
  end

--
They are the flesh. They are the bone.
They are the very cornerstone.