From bf873c43d4e37e01426e7df8f0be678ea22dfa19 Mon Sep 17 00:00:00 2001 From: tasn Date: Wed, 11 Apr 2012 07:05:24 +0000 Subject: [PATCH] eobj: Improve error reporting. This order of messages is better. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@70004 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- lib/eobj.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/eobj.c b/lib/eobj.c index 4ef0fa2..3d3b124 100644 --- a/lib/eobj.c +++ b/lib/eobj.c @@ -678,15 +678,15 @@ eobj_add(const Eobj_Class *klass, Eobj *parent) _eobj_kls_itr_init(obj); eobj_class_constructor(obj, klass); - if (*obj->kls_itr && *(obj->kls_itr + 1)) + if (eobj_generic_data_get(obj, CONSTRUCT_ERROR_KEY)) { - ERR("Type '%s' - Not all of the object constructors have been executed.", klass->desc->name); + ERR("Type '%s' - One of the object constructors have failed.", klass->desc->name); goto fail; } - if (eobj_generic_data_get(obj, CONSTRUCT_ERROR_KEY)) + if (*obj->kls_itr && *(obj->kls_itr + 1)) { - ERR("Type '%s' - One of the object constructors have failed.", klass->desc->name); + ERR("Type '%s' - Not all of the object constructors have been executed.", klass->desc->name); goto fail; } @@ -712,6 +712,15 @@ eobj_unref(Eobj *obj) const Eobj_Class *klass = eobj_class_get(obj); _eobj_kls_itr_init(obj); eobj_class_destructor(obj, klass); + if (eobj_generic_data_get(obj, CONSTRUCT_ERROR_KEY)) + { + ERR("Type '%s' - One of the object destructors have failed.", klass->desc->name); + } + + if (*obj->kls_itr && *(obj->kls_itr + 1)) + { + ERR("Type '%s' - Not all of the object destructors have been executed.", klass->desc->name); + } /*FIXME: add eobj_class_unref(klass) ? - just to clear the caches. */ Eina_List *itr, *itr_n; -- 2.7.4