Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/server/server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ open DebugMessage
open ErrorUtils
open Api
open IPCUtil
open Printexc

(* You can swap the RPC engine, by using a different monad here,
note however that if you are using an asynchronous one, like
Expand Down Expand Up @@ -58,11 +59,12 @@ let handler rpc conn =
should ensure that the computation is started by a runner *)
let res =
try M.run (rpc req)
with _ ->
with e ->
let exc_str = Caml.Printexc.get_backtrace() in
Rpc.failure
(RPCError.rpc_of_t
RPCError.
{ code = 0; message = "scilla-server: incorrect invocation" })
( RPCError.rpc_of_t
RPCError.
{ code = 0; message = "scilla-server: exception " ^ exc_str } )
in
let str = Jsonrpc.string_of_response ~version:Jsonrpc.V2 res in
IPCUtil.send_delimited oc str
Expand Down