mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-08 03:47:57 -04:00
doc
This commit is contained in:
parent
bb520d90b5
commit
14f9a2ea94
1 changed files with 5 additions and 2 deletions
|
|
@ -95,7 +95,7 @@ This more or less corresponds to:
|
||||||
```ocaml
|
```ocaml
|
||||||
let f x y z =
|
let f x y z =
|
||||||
let _trace_span = Trace_core.enter_span ~__FILE__ ~__LINE__ "Foo.f" in
|
let _trace_span = Trace_core.enter_span ~__FILE__ ~__LINE__ "Foo.f" in
|
||||||
try
|
match
|
||||||
do_sth x;
|
do_sth x;
|
||||||
do_sth y;
|
do_sth y;
|
||||||
begin
|
begin
|
||||||
|
|
@ -108,8 +108,11 @@ let f x y z =
|
||||||
Trace_core.exit_span _trace_span
|
Trace_core.exit_span _trace_span
|
||||||
raise e
|
raise e
|
||||||
end;
|
end;
|
||||||
|
with
|
||||||
|
| res ->
|
||||||
Trace_core.exit_span _trace_span
|
Trace_core.exit_span _trace_span
|
||||||
with e ->
|
res
|
||||||
|
| exception e ->
|
||||||
Trace_core.exit_span _trace_span
|
Trace_core.exit_span _trace_span
|
||||||
raise e
|
raise e
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue