Stacktraces in Ruby

21 February 2006

You can get at a stacktrace in Ruby through Kernel#caller To dump out stacktraces in your code simply add

    caller.each { |l| $stderr.puts l }

(For some reason, I keep forgetting how to do that, and have to Google for it every time)

Creative Commons License Watzmann.Blog by David Lutterkort is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

Generated with Jekyll