Skip to content

Commit

Permalink
avoid silent error in timer
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Feb 15, 2024
1 parent 2299d7f commit 30b7d49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/unix/simple_timer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ let run_every_s_ (self : state) period f : unit =
(* schedule next iteration *)
run_after_s_ self period loop
| exception Stop_timer -> ()
| exception e ->
Printf.eprintf "exception in timer action: %s\n%!" (Printexc.to_string e);
run_after_s_ self period loop
in
run_after_s_ self period loop

Expand Down

0 comments on commit 30b7d49

Please sign in to comment.