Nick Coghlan <ncogh...@gmail.com> added the comment:

Hmm, I wonder if the UX problem with the current chaining might be solved in a 
different way, by doing something similar to what we did for codec exceptions 
(where we want to try to mention the codec name, but also don't want to change 
the exception type, and want to include the original exception text in the 
wrapper's message).

The codecs related call is at 
https://github.com/python/cpython/blob/0c1c4563a65ac451021d927058e4f25013934eb2/Python/codecs.c#L389
 but most of the heavy lifting has since been refactored out into the 
_PyErr_TrySetFromCause helper function: 
https://github.com/python/cpython/blob/55edd0c185ad2d895b5d73e47d67049bc156b654/Objects/exceptions.c#L2713

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to