diff options
author | Guido van Rossum <guido@python.org> | 1996-09-11 22:51:57 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-09-11 22:51:57 (GMT) |
commit | 22a85e5308499cef3dc6171b9697bbf43ef4f0f1 (patch) | |
tree | fa87461a49293dca1027bd75b97f5315c27bc408 /Objects/classobject.c | |
parent | b7fc30410919f3b0aba4b17bc66803e71bccab46 (diff) | |
download | cpython-22a85e5308499cef3dc6171b9697bbf43ef4f0f1.zip cpython-22a85e5308499cef3dc6171b9697bbf43ef4f0f1.tar.gz cpython-22a85e5308499cef3dc6171b9697bbf43ef4f0f1.tar.bz2 |
More detailed error message about exception in __del__
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r-- | Objects/classobject.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index 9b12d18..4ac6a0e 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -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); |