Skip to content

Commit

Permalink
add comment about the captured backtrace
Browse files Browse the repository at this point in the history
  • Loading branch information
tatchi committed Sep 19, 2024
1 parent 668c5d8 commit f771f08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions exn.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ let to_string exn =

let str = to_string

(**
The original backtrace is captured via `Printexc.get_raw_backtrace ()`.
However, note that this backtrace might not correspond to the provided `exn`
if another exception was raised before `fail` is called.
*)
let fail ?exn fmt =
let fails s =
match exn with
Expand Down

0 comments on commit f771f08

Please sign in to comment.