Skip to content

Commit 759a5ce

Browse files
committed
Recover gracefully from general exceptions
1 parent 3eae6ff commit 759a5ce

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/modality_emulator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ def main():
206206
except KeyboardInterrupt:
207207
logger.warning("\n Modality Emulator shutting down...")
208208
break
209+
except Exception:
210+
logger.exception("Error in Modality Emulator")
211+
time.sleep(5) # Wait before retrying to avoid tight error loop
209212

210213

211214
if __name__ == "__main__":

0 commit comments

Comments
 (0)