mirror of https://github.com/m-labs/artiq.git
protocols/pc_rpc: short_exc_info
This commit is contained in:
parent
ca4e6e03fa
commit
67ab8dbfa5
|
@ -510,9 +510,13 @@ class Server(_AsyncioServer):
|
||||||
.format(obj["action"]))
|
.format(obj["action"]))
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
raise
|
raise
|
||||||
except:
|
except Exception as exc:
|
||||||
|
short_exc_info = type(exc).__name__
|
||||||
|
exc_str = str(exc)
|
||||||
|
if exc_str:
|
||||||
|
short_exc_info += ": " + exc_str.splitlines()[0]
|
||||||
return {"status": "failed",
|
return {"status": "failed",
|
||||||
"message": traceback.format_exc()}
|
"message": short_exc_info + "\n" + traceback.format_exc()}
|
||||||
finally:
|
finally:
|
||||||
if self._noparallel is not None:
|
if self._noparallel is not None:
|
||||||
self._noparallel.release()
|
self._noparallel.release()
|
||||||
|
|
Loading…
Reference in New Issue