On 16May2019 0902, Steve Dower wrote:
Actually, if the default implementation prints the exception message,
how is this different from sys.excepthook? Specifically, from the point
of customizing the hooks.
If I were going to replace unraisablehook to do something on specific
exceptions, I'm almost certainly going to replace excepthook as well,
no? The only difference is whether there are any try/except blocks in
between, and by definition I think the answer is no (in both cases, or
we wouldn't have reached the hook).
Do you have scenarios in mind where you would need these to do different
things? And would those be just as well served by a flag on the
exception object rather than an entirely separate hook?
Finally, the changes aren't in yet but PEP 578 is accepted, so perhaps
this could also be satisfied by an audit hook for an exception that's
about to be ignored?
Cheers,
Steve
_______________________________________________
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