summaryrefslogtreecommitdiff
path: root/legacy/eobj
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2012-06-10 07:53:46 +0000
committerTom Hacohen <tom@stosb.com>2012-06-10 07:53:46 +0000
commit33c71f97aa9a69492cfa590242ce075584434267 (patch)
treea1b5a3bedafe5a2d061838c12ed9a09402ad9278 /legacy/eobj
parent9632a6ef4e9d849cde67992bbd116300437a8748 (diff)
Eo: Improved error reporting with failed constructors.
SVN revision: 71891
Diffstat (limited to 'legacy/eobj')
-rw-r--r--legacy/eobj/lib/eo.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/legacy/eobj/lib/eo.c b/legacy/eobj/lib/eo.c
index 823f3445ec..f5baf943c7 100644
--- a/legacy/eobj/lib/eo.c
+++ b/legacy/eobj/lib/eo.c
@@ -1141,13 +1141,14 @@ eo_add(const Eo_Class *klass, Eo *parent)
1141 1141
1142 if (EINA_UNLIKELY(_eo_error_get(obj))) 1142 if (EINA_UNLIKELY(_eo_error_get(obj)))
1143 { 1143 {
1144 ERR("Type '%s' - One of the object constructors have failed.", klass->desc->name); 1144 ERR("Object of class '%s' - One of the object constructors have failed.", klass->desc->name);
1145 goto fail; 1145 goto fail;
1146 } 1146 }
1147 1147
1148 if (EINA_UNLIKELY(!_eo_kls_itr_reached_end(&obj->mro_itr))) 1148 if (EINA_UNLIKELY(!_eo_kls_itr_reached_end(&obj->mro_itr)))
1149 { 1149 {
1150 ERR("Type '%s' - Not all of the object constructors have been executed.", klass->desc->name); 1150 const Eo_Class *cur_klass = _eo_kls_itr_get(&obj->mro_itr);
1151 ERR("Object of class '%s' - Not all of the object constructors have been executed, last destructor was of class: '%s'", klass->desc->name, cur_klass->desc->name);
1151 goto fail; 1152 goto fail;
1152 } 1153 }
1153 _eo_kls_itr_end(&obj->mro_itr, &prev_state); 1154 _eo_kls_itr_end(&obj->mro_itr, &prev_state);
@@ -1254,12 +1255,13 @@ _eo_del_internal(Eo *obj)
1254 _eo_destructor(obj, klass); 1255 _eo_destructor(obj, klass);
1255 if (_eo_error_get(obj)) 1256 if (_eo_error_get(obj))
1256 { 1257 {
1257 ERR("Type '%s' - One of the object destructors have failed.", klass->desc->name); 1258 ERR("Object of class '%s' - One of the object destructors have failed.", klass->desc->name);
1258 } 1259 }
1259 1260
1260 if (!_eo_kls_itr_reached_end(&obj->mro_itr)) 1261 if (!_eo_kls_itr_reached_end(&obj->mro_itr))
1261 { 1262 {
1262 ERR("Type '%s' - Not all of the object destructors have been executed.", klass->desc->name); 1263 const Eo_Class *cur_klass = _eo_kls_itr_get(&obj->mro_itr);
1264 ERR("Object of class '%s' - Not all of the object destructors have been executed, last destructor was of class: '%s'", klass->desc->name, cur_klass->desc->name);
1263 } 1265 }
1264 _eo_kls_itr_end(&obj->mro_itr, &prev_state); 1266 _eo_kls_itr_end(&obj->mro_itr, &prev_state);
1265 /*FIXME: add eo_class_unref(klass) ? - just to clear the caches. */ 1267 /*FIXME: add eo_class_unref(klass) ? - just to clear the caches. */