Module OpamStd.Exn
val fatal : exn -> unit
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
val register_backtrace : exn -> unit
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.