Author vstinner
Recipients CyberJacob, Decorater, Matt Groth, ellisj, eric.araujo, mwh, ncoghlan, nikratio, pitrou, tiagoaoa, tim.peters, undercoveridiot, vlasovskikh, vstinner
Date 2018-08-02.09:21:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533201688.59.0.56676864532.issue1230540@psf.upfronthosting.co.za>
In-reply-to
Content
Would it be possible to modify the default implementation of sys.excepthook to have a different output when it's not called from the main thread? Mimick the current traceback from threads.

Would it be possible to call threading.current_thread() from the default sys.excepthook? The problem is to get the threading module and to decide how to handle error on getting the current thread.

An alternative would be to introduce a new hook to log exceptions in threads, ex: sys.threadexcepthook. That hoook would take a 4th parameter. But Andrey Vlasovskikh didn't like this idea.
History
Date User Action Args
2018-08-02 09:21:28vstinnersetrecipients: + vstinner, mwh, tim.peters, ncoghlan, ellisj, pitrou, tiagoaoa, eric.araujo, nikratio, undercoveridiot, vlasovskikh, Decorater, CyberJacob, Matt Groth
2018-08-02 09:21:28vstinnersetmessageid: <1533201688.59.0.56676864532.issue1230540@psf.upfronthosting.co.za>
2018-08-02 09:21:28vstinnerlinkissue1230540 messages
2018-08-02 09:21:28vstinnercreate