Hi all,
I've written PEP 678, proposing the addition of a __note__ attribute
which can be used to enrich displayed exceptions. This is particularly
useful with ExceptionGroup, or where exception chaining is unsuitable, and
ensures that 'orphan' output is not produced if the annotated exception is
caught.
Link to the PEP: https://www.python.org/dev/peps/pep-0678/
*Please, redirect all discussions to:*
https://discuss.python.org/t/pep-678-enriching-exceptions-with-notes/13374
Thanks for your time, and to those who have already made (very helpful!)
comments!
Best wishes from just-moved-to San Francisco,
Zac Hatfield-Dodds
I've written PEP 678, proposing the addition of a __note__ attribute
which can be used to enrich displayed exceptions. This is particularly
useful with ExceptionGroup, or where exception chaining is unsuitable, and
ensures that 'orphan' output is not produced if the annotated exception is
caught.
Link to the PEP: https://www.python.org/dev/peps/pep-0678/
*Please, redirect all discussions to:*
https://discuss.python.org/t/pep-678-enriching-exceptions-with-notes/13374
Thanks for your time, and to those who have already made (very helpful!)
comments!
Best wishes from just-moved-to San Francisco,
Zac Hatfield-Dodds