mirror of https://github.com/m-labs/artiq.git
Improve error msg for RPC return failure
Signed-off-by: Michael Birtwell <michael.birtwell@oxionics.com>
This commit is contained in:
parent
a028b5c9f7
commit
9a2506c74f
|
@ -628,11 +628,17 @@ class CommKernel:
|
|||
else:
|
||||
logger.debug("rpc service: %d %r %r = %r",
|
||||
service_id, args, kwargs, result)
|
||||
self._write_header(Request.RPCReply)
|
||||
self._write_bytes(return_tags)
|
||||
self._send_rpc_value(bytearray(return_tags),
|
||||
result, result, service)
|
||||
self._flush()
|
||||
try:
|
||||
self._write_header(Request.RPCReply)
|
||||
self._write_bytes(return_tags)
|
||||
self._send_rpc_value(bytearray(return_tags),
|
||||
result, result, service)
|
||||
self._flush()
|
||||
except Exception as ex:
|
||||
raise RuntimeError(
|
||||
f"Failed to return RPC value for RPC [{service_id}]{service!r} "
|
||||
f"return_tags={return_tags}: {ex}"
|
||||
) from ex
|
||||
|
||||
def _serve_exception(self, embedding_map, symbolizer, demangler):
|
||||
exception_count = self._read_int32()
|
||||
|
|
Loading…
Reference in New Issue