Skip to content

Commit

Permalink
Improve Risco exception logging
Browse files Browse the repository at this point in the history
  • Loading branch information
OnFreund committed Apr 8, 2024
1 parent cbbadf6 commit 519733a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion homeassistant/components/risco/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ async def _async_setup_local_entry(hass: HomeAssistant, entry: ConfigEntry) -> b
return False

async def _error(error: Exception) -> None:
_LOGGER.error("Error in Risco library: %s", error)
try:
raise error
except Exception: # pylint: disable=broad-exception-caught
# This is an exception object we're purposely raising
_LOGGER.exception("Error in Risco library")

entry.async_on_unload(risco.add_error_handler(_error))

Expand Down

0 comments on commit 519733a

Please sign in to comment.