From b1ccd580409b8f99f79ee4a990894d25b9b9d5c8 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 22 Dec 2023 21:33:30 -0500 Subject: [PATCH] try to avoid capture --- src/ppx/ppx_trace.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ppx/ppx_trace.ml b/src/ppx/ppx_trace.ml index 9601005..e088cf9 100644 --- a/src/ppx/ppx_trace.ml +++ b/src/ppx/ppx_trace.ml @@ -53,9 +53,9 @@ let expand_top_let ~ctxt rec_flag (vbs : _ list) = Trace_core.enter_span ~__FILE__ ~__LINE__ __FUNCTION__ in try - let res = [%e e] in + let _trace_ppx_res = [%e e] in Trace_core.exit_span _trace_span; - res + __trace_ppx_res with exn -> Trace_core.exit_span _trace_span; raise exn]