Dealing with stack backtraces.
Backtrace module deals with two different kinds of backtraces:
1. snapshots of the stack obtained on demand (
2. the stack frames unwound when an exception is raised (
Backtrace.t is a snapshot of the stack obtained by calling
Backtrace.get. It is
represented as a string with newlines separating the frames.
sexp_of_t splits the
string at newlines and removes some of the cruft, leaving a human-friendly list of
to_string does not.
Backtrace.Exnhas functions for controlling and printing the backtrace of the most recently raised exception.