From c42de1e4939de459269a1c08e621731677174ee0 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Tue, 2 Jan 2024 16:26:40 +0000 Subject: [PATCH] Remove default backtrace from Switch.fail If you didn't pass a backtrace then it would attach a bogus one, which was confusing. --- lib_eio/core/switch.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_eio/core/switch.ml b/lib_eio/core/switch.ml index 245e6ba40..25f770e3a 100644 --- a/lib_eio/core/switch.ml +++ b/lib_eio/core/switch.ml @@ -47,7 +47,7 @@ let combine_exn ex = function | Some ex1 -> Exn.combine ex1 ex (* Note: raises if [t] is finished or called from wrong domain. *) -let fail ?(bt=Printexc.get_raw_backtrace ()) t ex = +let fail ?(bt=Printexc.get_callstack 0) t ex = check_our_domain t; if t.exs = None then Trace.error t.cancel.id ex;