A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2019-May/157440.html below:

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

[Python-Dev] bpo-36829: Add sys.unraisablehook() [Python-Dev] bpo-36829: Add sys.unraisablehook()Victor Stinner vstinner at redhat.com
Thu May 16 05:57:24 EDT 2019
Le jeu. 16 mai 2019 à 04:44, Nathaniel Smith <njs at 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.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4