[PyPy-issue] [issue586] Show a traceback when an exception is raised in a destructor

Armin Rigo pypy-dev-issue at codespeak.net
Sat Dec 25 19:47:02 CET 2010

Armin Rigo <armin.rigo at gmail.com> added the comment:

Ah.  It's likely to be because the call to close() raises an error -- like disk
full, or something else -- but this gets eaten because it occurs in the
destructor.  (Incidentally, that's one more reason for which all files should be
closed explicitly even on CPython.)  All we can do is improve this special case
to print the problem as explicitly as possible, e.g. including the errno
message.  There is not a lot more to do I'm afraid.

PyPy development tracker <pypy-dev-issue at codespeak.net>

More information about the Pypy-issue mailing list