Kaydet (Commit) 22a85e53 authored tarafından Guido van Rossum's avatar Guido van Rossum

More detailed error message about exception in __del__

üst b7fc3041
......@@ -406,9 +406,12 @@ instance_dealloc(inst)
if (res == NULL) {
PyObject *f = sysget("stderr");
err_clear();
if (f != NULL)
writestring(
"exception in __del__ method ignored\n", f);
if (f != NULL) {
writestring("exception in ", f);
writestring(PyString_AsString(
inst->in_class->cl_name), f);
writestring(".__del__() ignored\n", f);
}
}
else
DECREF(res);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment