mirror of
https://github.com/c-cube/linol.git
synced 2025-12-06 03:05:31 -05:00
Log exceptions in async notification handler
This commit is contained in:
parent
9a7e1c221c
commit
8123e95a5f
1 changed files with 4 additions and 1 deletions
|
|
@ -76,7 +76,10 @@ module Make (IO : IO) = struct
|
|||
end
|
||||
|
||||
let async (self : #base_server) f : unit IO.t =
|
||||
self#spawn_query_handler f;
|
||||
self#spawn_query_handler
|
||||
(fun () -> try f () with err ->
|
||||
Log.err (fun k -> k "LSP async notification handler failed: %s" (Printexc.to_string err));
|
||||
IO.return ());
|
||||
IO.return ()
|
||||
|
||||
(** A wrapper to more easily reply to notifications *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue