Skip to content

Commit

Permalink
Print exception backtraces in LSP.
Browse files Browse the repository at this point in the history
Signed-off-by: Karolis Petrauskas <[email protected]>
  • Loading branch information
kape1395 committed Aug 31, 2024
1 parent 9c27e42 commit 9a6cadd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lsp/lib/server/handlers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ module Make (CB : Callbacks) = struct
with exc ->
let open Jsonrpc.Response.Error in
let exc_str = Printexc.to_string exc in
Eio.traceln "LSP request failed with exception %s" exc_str;
let exc_btr = Printexc.get_backtrace () in
Eio.traceln "LSP request failed with exception %s, backtrace:\n%s" exc_str exc_btr;
reply_error req Code.InternalError exc_str state)
| Response resp -> handle_jsonrpc_response resp state
| Batch_call sub_packets ->
Expand Down

0 comments on commit 9a6cadd

Please sign in to comment.