Skip to content

Commit

Permalink
master/worker: print short exception info in first log entry of worke…
Browse files Browse the repository at this point in the history
…r error
sbourdeauducq committed Nov 22, 2015
1 parent 8b4b269 commit de30a4b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions artiq/master/worker_impl.py
Original file line number Diff line number Diff line change
@@ -221,8 +221,13 @@ def main():
put_object({"action": "completed"})
elif action == "terminate":
break
except:
logging.error("Worker terminating with exception", exc_info=True)
except Exception as exc:
short_exc_info = type(exc).__name__
exc_str = str(exc)
if exc_str:
short_exc_info += ": " + exc_str
logging.error("Terminating with exception (%s)",
short_exc_info, exc_info=True)
finally:
device_mgr.close_devices()

0 comments on commit de30a4b

Please sign in to comment.