Skip to content

Commit

Permalink
Remove default backtrace from Switch.fail
Browse files Browse the repository at this point in the history
If you didn't pass a backtrace then it would attach a bogus one,
which was confusing.
  • Loading branch information
talex5 committed Jan 2, 2024
1 parent b942dde commit c42de1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib_eio/core/switch.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c42de1e

Please sign in to comment.