mirror of
https://github.com/c-cube/linol.git
synced 2025-12-06 03:05:31 -05:00
Update main.ml
Make `task` a function in order to catch its exceptions.
This commit is contained in:
parent
1f977ad145
commit
630ead118c
1 changed files with 2 additions and 2 deletions
|
|
@ -82,11 +82,11 @@ let run () =
|
|||
Eio_main.run @@ fun env ->
|
||||
let s = new lsp_server in
|
||||
let server = Linol_eio.Jsonrpc2.create_stdio ~env s in
|
||||
let task =
|
||||
let task () =
|
||||
let shutdown () = s#get_status = `ReceivedExit in
|
||||
Linol_eio.Jsonrpc2.run ~shutdown server
|
||||
in
|
||||
match task with
|
||||
match task () with
|
||||
| () -> ()
|
||||
| exception e ->
|
||||
let e = Printexc.to_string e in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue