<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 16, 2019, 09:07 Steve Dower <<a href="mailto:steve.dower@python.org" target="_blank" rel="noreferrer">steve.dower@python.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Actually, if the default implementation prints the exception message, <br>
how is this different from sys.excepthook? Specifically, from the point <br>
of customizing the hooks.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">sys.excepthook means the program has fully unwound and is about to exit. This is pretty different from an exception inside a __del__ or background thread or whatever, where the program definitely hasn't unwound and is likely to continue. And I'm pretty sure they have behavioral differences already, like if you pass in a SystemExit exception then sys.excepthook doesn't print anything, but PyErr_WriteUnraiseable prints a traceback.</div><div dir="auto"><br></div><div dir="auto">So making them two separate hooks seems right to me. Some people will override both; that's fine.</div><div dir="auto"><br></div><div dir="auto">-n</div></div>