Skip to content

Commit

Permalink
Log unexpected exceptions causing recorder shutdown (#99445)
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery committed Sep 2, 2023
1 parent 9e9aa16 commit 7168e71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions homeassistant/components/recorder/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,10 @@ def run(self) -> None:
"""Run the recorder thread."""
try:
self._run()
except Exception: # pylint: disable=broad-exception-caught
_LOGGER.exception(
"Recorder._run threw unexpected exception, recorder shutting down"
)
finally:
# Ensure shutdown happens cleanly if
# anything goes wrong in the run loop
Expand Down

0 comments on commit 7168e71

Please sign in to comment.