Le jeu. 16 mai 2019 à 04:44, Nathaniel Smith <n...@pobox.com> a écrit :
> What happens if the hook raises an exception?

Aha, thanks for asking the question!

If there is a custom hook and the hook fails, the default hook logs
the exception of the custom hook.

Technically, even if the default hook fails, the default hook is
called again to handle its own exception :-)

The fallback uses a direct access to the C implementation of the
default hook which reduces the risk of bugs.

My implementation contains an unit test to ensure that if a custom
hook raises an exception, it's a logged as expected ;-)

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to