classification
Title: Call sys.except_hook if exception occurs in __del__
Type: enhancement Stage: test needed
Components: Interpreter Core Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, jpe
Priority: normal Keywords:

Created on 2007-03-30 15:49 by jpe, last changed 2010-07-10 09:53 by BreamoreBoy.

Messages (2)
msg55052 - (view) Author: John Ehresman (jpe) * Date: 2007-03-30 15:49
Is there a reason why sys.except_hook isn't called when __del__ returns with an exception?  If not, I can write a patch to call sys.except_hook from PyErr_WriteUnraisable.  The default of printing the full traceback should be possible in many situations.  
msg109837 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-07-10 09:53
Please provide a patch.
History
Date User Action Args
2010-07-10 09:53:22BreamoreBoysetnosy: + BreamoreBoy

messages: + msg109837
versions: + Python 3.2, - Python 3.1, Python 2.7
2009-03-30 17:03:47ajaksu2setstage: test needed
versions: + Python 3.1, Python 2.7, - Python 2.6
2007-03-30 15:49:23jpecreate