[Python-Dev] bpo-36829: Add sys.unraisablehook()

Victor Stinner vstinner at redhat.com
Thu May 16 21:23:34 EDT 2019


Le ven. 17 mai 2019 à 03:10, Gregory P. Smith <greg at krypto.org> a écrit :
> I like the feature, we should have it.  It'll be useful for debugging and probably more.
>
> Which brings me to the annoying paint color question: These exceptions were most definitely raised. Thus the term "unraisable" is wrong. I believe you really mean "uncatchable".

"unraisablehook" name comes from the existing PyErr_WriteUnraisable().

I understood that "unraisable" means that the function calling
PyErr_WriteUnraisable() cannot "raise" the exception to its caller.
The exception has to be "swallowed" by the function.

--

If you like the feature, please review my PR :-)

https://github.com/python/cpython/pull/13187

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.


More information about the Python-Dev mailing list