Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

traceback.format_exception(...) usage that is compatible with Python 3.7 and 3.11 #15599

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15599.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Print full error and stack-trace of any exception that occurs during startup/initialization.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the same changelog as #15569 so they merge

2 changes: 1 addition & 1 deletion synapse/app/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def handle_startup_exception(e: Exception) -> NoReturn:
# the reactor are written to the logs, followed by a summary to stderr.
logger.exception("Exception during startup")

error_string = "".join(traceback.format_exception(e))
error_string = "".join(traceback.format_exception(type(e), e, e.__traceback__))
indented_error_string = indent(error_string, " ")

quit_with_error(
Expand Down