]> granicus.if.org Git - python/commitdiff
More detailed error message about exception in __del__
authorGuido van Rossum <guido@python.org>
Wed, 11 Sep 1996 22:51:57 +0000 (22:51 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 11 Sep 1996 22:51:57 +0000 (22:51 +0000)
Objects/classobject.c

index 9b12d1876a836b94d9ec8d636e6e5d2c206d7462..4ac6a0eff6b3b7cb17a1e75b894eb68a00ba6537 100644 (file)
@@ -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);