Skip to content

Commit

Permalink
worker: restore short exception info in first line of log
Browse files Browse the repository at this point in the history
sbourdeauducq committed Jan 26, 2016
1 parent 3cf67af commit be5162d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion artiq/master/worker_impl.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit be5162d

Please sign in to comment.