Skip to content

Commit 1e2d55a

Browse files
committed
More annoying compatibility degrading the experience for everyone
1 parent 1f8e833 commit 1e2d55a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/utils/odoc_utils.ml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,13 @@ module Fun = struct
8686

8787
let protect ~(finally : unit -> unit) work =
8888
let finally_no_exn () =
89-
try finally ()
90-
with e ->
91-
let bt = Printexc.get_raw_backtrace () in
92-
Printexc.raise_with_backtrace (Finally_raised e) bt
89+
try finally () with e -> raise (Finally_raised e)
9390
in
9491
match work () with
9592
| result ->
9693
finally_no_exn ();
9794
result
9895
| exception work_exn ->
99-
let work_bt = Printexc.get_raw_backtrace () in
10096
finally_no_exn ();
101-
Printexc.raise_with_backtrace work_exn work_bt
97+
raise work_exn
10298
end

0 commit comments

Comments
 (0)