Skip to content

@smtlaissezfaire /asdfasdf
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
---------------------------------------------------- Exception#backtrace
exception.backtrace => array
From Ruby 1.8
------------------------------------------------------------------------
Returns any backtrace associated with the exception. The backtrace
is an array of strings, each containing either ``filename:lineNo:
in `method''' or ``filename:lineNo.''
def a
raise "boom"
end
def b
a()
end
begin
b()
rescue => detail
print detail.backtrace.join("\n")
end
_produces:_
prog.rb:2:in `a'
prog.rb:6:in `b'
prog.rb:10
(END)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.