Skip to content

Commit

Permalink
use reraise
Browse files Browse the repository at this point in the history
  • Loading branch information
tatchi committed Sep 24, 2024
1 parent 00d4684 commit ce23fac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lwt/opentelemetry_lwt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ module GC_metrics = GC_metrics
module Metrics_callbacks = Metrics_callbacks
module Trace_context = Trace_context

external reraise : exn -> 'a = "%reraise"
(** This is equivalent to [Lwt.reraise]. We inline it here so we don't force
to use Lwt's latest version *)

module Trace = struct
include Trace

Expand All @@ -30,7 +34,7 @@ module Trace = struct
with e ->
let bt = Printexc.get_raw_backtrace () in
let () = finally (Error (e, bt)) in
raise e
reraise e
end

module Metrics = struct
Expand Down

0 comments on commit ce23fac

Please sign in to comment.