'sys.excepthook' and threading

前端 未结 3 698
遥遥无期
遥遥无期 2020-12-01 12:12

I am using Python 2.5 and trying to use a self-defined excepthook in my program. In the main thread it works perfectly fine. But in a thread started with the th

3条回答
  •  庸人自扰
    2020-12-01 12:53

    It looks like there is a related bug reported here with workarounds. The suggested hacks basically wrap run in a try/catch and then call sys.excepthook(*sys.exc_info())

提交回复
热议问题