From be5162d60fbb1d4896a302d7b002584ef3c143b2 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 26 Jan 2016 22:07:54 +0100 Subject: [PATCH] worker: restore short exception info in first line of log --- artiq/master/worker_impl.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/artiq/master/worker_impl.py b/artiq/master/worker_impl.py index 30d2a8168..164bf7cc4 100644 --- a/artiq/master/worker_impl.py +++ b/artiq/master/worker_impl.py @@ -252,7 +252,11 @@ def main(): # When we get CompileError, a more suitable diagnostic has already # been printed. if not isinstance(exc, CompileError): - lines = ["Terminating with exception\n"] + short_exc_info = type(exc).__name__ + exc_str = str(exc) + if exc_str: + short_exc_info += ": " + exc_str + lines = ["Terminating with exception ("+short_exc_info+")\n"] lines += traceback.format_exception_only(type(exc), exc) if hasattr(exc, "parent_traceback"): lines += exc.parent_traceback