diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2021-12-03 22:01:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-03 22:01:15 (GMT) |
commit | 5bb7ef2768be5979b306e4c7552862b1746c251d (patch) | |
tree | 2c5d4d96a1e5bba8d0d918cc413d882f10308e63 /Doc/whatsnew | |
parent | d9301703fb1086cafbd730c17e3d450a192485d6 (diff) | |
download | cpython-5bb7ef2768be5979b306e4c7552862b1746c251d.zip cpython-5bb7ef2768be5979b306e4c7552862b1746c251d.tar.gz cpython-5bb7ef2768be5979b306e4c7552862b1746c251d.tar.bz2 |
bpo-45607: Make it possible to enrich exception displays via setting their __note__ field (GH-29880)
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.11.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 1ec629d..c498225 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -146,6 +146,12 @@ The :option:`-X` ``no_debug_ranges`` option and the environment variable See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya and Ammar Askar in :issue:`43950`.) +Exceptions can be enriched with a string ``__note__`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``__note__`` field was added to :exc:`BaseException`. It is ``None`` +by default but can be set to a string which is added to the exception's +traceback. (Contributed by Irit Katriel in :issue:`45607`.) Other Language Changes ====================== |