File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -157,12 +157,15 @@ The :option:`-X` ``no_debug_ranges`` option and the environment variable
157
157
See :pep: `657 ` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya
158
158
and Ammar Askar in :issue: `43950 `.)
159
159
160
- Exceptions can be enriched with a string ``__note__ ``
161
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160
+ Exceptions can be enriched with notes (PEP 678)
161
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162
+
163
+ The :meth: `add_note ` method was added to :exc: `BaseException `. It can be
164
+ used to enrich exceptions with context information which is not available
165
+ at the time when the exception is raised. The notes added appear in the
166
+ default traceback. See :pep: `678 ` for more details. (Contributed by
167
+ Irit Katriel in :issue: `45607 `.)
162
168
163
- The ``__note__ `` field was added to :exc: `BaseException `. It is ``None ``
164
- by default but can be set to a string which is added to the exception's
165
- traceback. (Contributed by Irit Katriel in :issue: `45607 `.)
166
169
167
170
Other Language Changes
168
171
======================
You can’t perform that action at this time.
0 commit comments