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
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