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

Carl Friedrich Bolz pypy-dev-issue at codespeak.net
Thu Dec 2 13:54:32 CET 2010


Carl Friedrich Bolz <cfbolz at gmx.de> added the comment:

On 12/01/2010 10:04 PM, Dan Villiom Podlaski Christiansen wrote:
>
> New submission from Dan Villiom Podlaski
> Christiansen<danchr at gmail.com>:
>
> When an exception is raised in a destructor, PyPy currently prints a
> message like this:
>
> a destructor raised an exception, ignoring it
>
> Other than the fact that the word “was” seems to have been left out,
> this isn't terribly helpful. It doesn't say anything about the
> exception that was raised. Either printing a traceback or the
> destructor that failed would be a vast improvement. I think that's
> what CPython does.
>
> I tried reproducing this with a small test script, but it actually
> printed the destructor that failed. However, this isn't what I'm
> seeing in one of the remaining failures in Mercurial test suite.

This is quite likely a bug in PyPy that is just reported very
unhelpfully. Probably one of the interpreter-level destructors raised
something, e.g. files or similar. In this case writing the traceback
wouldn't help either, because there is none on the RPython level. Maybe
I can try to improve things so that at least some more information is
printed.

_______________________________________________________
PyPy development tracker <pypy-dev-issue at codespeak.net>
<https://codespeak.net/issue/pypy-dev/issue586>
_______________________________________________________



More information about the Pypy-issue mailing list