bluesky / ophyd

hardware abstraction in Python with an emphasis on EPICS
https://blueskyproject.io/ophyd
BSD 3-Clause "New" or "Revised" License
51 stars 79 forks source link

Add status repr to WaitTimeoutError message #1088

Closed dperl-dls closed 1 year ago

dperl-dls commented 1 year ago

In a similar situation to #1086 , we had an issue where the error message Status has failed to complete was not very illuminating as to which status that was, so I have added this information to the raise WaitTimeoutError calls in the same manner as it is added to other exception messages in status.py. This would be really helpful to us in avoiding wrapping every wait() with try/except to record what we are waiting on or subclassing every kind of status we have to modify wait() and I hope it might be useful to others too.

tacaswell commented 1 year ago

Thank you @dperl-dls !