diff --git a/CHANGES.rst b/CHANGES.rst index 6fe77f43dfe..3b1e1ef45d3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -44,6 +44,9 @@ Features added Patch by Chris Barrick. * #13227: Implement the :rst:role:`kbd` role as a ``SphinxRole``. Patch by Adam Turner. +* #13163: Always print tracebacks in full when Sphinx encounters an internal + error. + Patch by Kevin Deldycke. Bugs fixed ---------- diff --git a/sphinx/_cli/util/errors.py b/sphinx/_cli/util/errors.py index df7d1ad7cef..ab68f1c1041 100644 --- a/sphinx/_cli/util/errors.py +++ b/sphinx/_cli/util/errors.py @@ -225,9 +225,11 @@ def print_red(*values: str) -> None: print_red(__('Exception occurred:')) print_err(formatted_tb) - traceback_info_path = save_traceback( + traceback_output = full_exception_context( exception, message_log=message_log, extensions=extensions ) + print_err(traceback_output) + traceback_info_path = write_temporary_file(traceback_output) print_err(__('The full traceback has been saved in:')) print_err(traceback_info_path) print_err()