From 22a85e5308499cef3dc6171b9697bbf43ef4f0f1 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 11 Sep 1996 22:51:57 +0000 Subject: [PATCH] More detailed error message about exception in __del__ --- Objects/classobject.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Objects/classobject.c b/Objects/classobject.c index 9b12d1876a8..4ac6a0eff6b 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);