mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 20:07:55 -04:00
use reraise
This commit is contained in:
parent
00d46841e4
commit
ce23facec1
1 changed files with 5 additions and 1 deletions
|
|
@ -11,6 +11,10 @@ module GC_metrics = GC_metrics
|
||||||
module Metrics_callbacks = Metrics_callbacks
|
module Metrics_callbacks = Metrics_callbacks
|
||||||
module Trace_context = Trace_context
|
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
|
module Trace = struct
|
||||||
include Trace
|
include Trace
|
||||||
|
|
||||||
|
|
@ -30,7 +34,7 @@ module Trace = struct
|
||||||
with e ->
|
with e ->
|
||||||
let bt = Printexc.get_raw_backtrace () in
|
let bt = Printexc.get_raw_backtrace () in
|
||||||
let () = finally (Error (e, bt)) in
|
let () = finally (Error (e, bt)) in
|
||||||
raise e
|
reraise e
|
||||||
end
|
end
|
||||||
|
|
||||||
module Metrics = struct
|
module Metrics = struct
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue