Module OpamStd.ExnSource
To use when catching default exceptions: ensures we don't catch fatal errors like C-c. try-with should _always_ (by decreasing order of preference):
- either catch specific exceptions
- or re-raise the same exception (preferably with
Exn.finalise) - or call this function on the caught exception
Register a backtrace for when you need to process a finalizer (that internally uses exceptions) and then re-raise the same exception. To be printed by pretty_backtrace.
Return a pretty-printed backtrace
Runs the given finaliser, then reraises the given exception, while preserving backtraces (when the OCaml version permits, e.g. >= 4.05.0)