File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ let fork_daemon ~sw f =
3939 (* The daemon was cancelled because all non-daemon fibers are finished. *)
4040 ()
4141 | exception ex ->
42- Switch. fail sw ex; (* The [with_daemon] ensures this will succeed *)
42+ let bt = Printexc. get_raw_backtrace () in
43+ Switch. fail ~bt sw ex; (* The [with_daemon] ensures this will succeed *)
4344 ) (* else the fiber should report the error to [sw], but [sw] is failed anyway *)
4445
4546let fork_promise ~sw f =
@@ -65,7 +66,8 @@ let fork_promise_exn ~sw f =
6566 match Switch. with_op sw f with
6667 | x -> Promise. resolve r x
6768 | exception ex ->
68- Switch. fail sw ex (* The [with_op] ensures this will succeed *)
69+ let bt = Printexc. get_raw_backtrace () in
70+ Switch. fail ~bt sw ex (* The [with_op] ensures this will succeed *)
6971 );
7072 p
7173
You can’t perform that action at this time.
0 commit comments