package base
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=2100b0ed13fecf43be86ed45c5b2cc4d
sha512=628610caff7e124631870fa1e29661caac28bdfdb18750ee43b868037da3d65d6dd9023b4be7c4c52405679efb5e865a6632d95606a22b28a36636a6bf706ef3
doc/base/Base/Backtrace/index.html
Module Base.BacktraceSource
Module for managing stack backtraces.
The Backtrace module deals with two different kinds of backtraces:
- Snapshots of the stack obtained on demand (
Backtrace.get) - The stack frames unwound when an exception is raised (
Backtrace.Exn)
A 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 frames, but to_string does not.
The value of elide controls the behavior of backtrace serialization functions such as to_string, to_string_list, and sexp_of_t. When set to false, these functions behave as expected, returning a faithful representation of their argument. When set to true, these functions will ignore their argument and return a message indicating that behavior.
The default value is false.
Backtrace.Exn has functions for controlling and printing the backtrace of the most recently raised exception.
User code never calls this. It is called only in base.ml, as a top-level side effect, to initialize am_recording () as specified above.