Skip to content

Commit be5162d

Browse files
committedJan 26, 2016
worker: restore short exception info in first line of log
1 parent 3cf67af commit be5162d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

Diff for: ‎artiq/master/worker_impl.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,11 @@ def main():
252252
# When we get CompileError, a more suitable diagnostic has already
253253
# been printed.
254254
if not isinstance(exc, CompileError):
255-
lines = ["Terminating with exception\n"]
255+
short_exc_info = type(exc).__name__
256+
exc_str = str(exc)
257+
if exc_str:
258+
short_exc_info += ": " + exc_str
259+
lines = ["Terminating with exception ("+short_exc_info+")\n"]
256260
lines += traceback.format_exception_only(type(exc), exc)
257261
if hasattr(exc, "parent_traceback"):
258262
lines += exc.parent_traceback

0 commit comments

Comments
 (0)
Please sign in to comment.