mirror of https://github.com/python/cpython
More detailed error message about exception in __del__
This commit is contained in:
parent
b7fc304109
commit
22a85e5308
|
@ -406,9 +406,12 @@ instance_dealloc(inst)
|
||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
PyObject *f = sysget("stderr");
|
PyObject *f = sysget("stderr");
|
||||||
err_clear();
|
err_clear();
|
||||||
if (f != NULL)
|
if (f != NULL) {
|
||||||
writestring(
|
writestring("exception in ", f);
|
||||||
"exception in __del__ method ignored\n", f);
|
writestring(PyString_AsString(
|
||||||
|
inst->in_class->cl_name), f);
|
||||||
|
writestring(".__del__() ignored\n", f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DECREF(res);
|
DECREF(res);
|
||||||
|
|
Loading…
Reference in New Issue