Skip to content

Commit

Permalink
BUG-3536 - fix RichHandler not handling exception
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-mrow committed Nov 10, 2024
1 parent 43d3b04 commit 2935d2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rich/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ def get_level_text(self, record: LogRecord) -> Text:

def emit(self, record: LogRecord) -> None:
"""Invoked by logging."""
message = self.format(record)
try:
message = self.format(record)
except Exception:
self.handleError(record)

traceback = None
if (
self.rich_tracebacks
Expand Down

0 comments on commit 2935d2d

Please sign in to comment.