summaryrefslogtreecommitdiff
path: root/legacy/eobj
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2012-06-07 11:32:17 +0000
committerTom Hacohen <tom@stosb.com>2012-06-07 11:32:17 +0000
commit242d324bbae6923a7d7dd75b562bf81c299e1e23 (patch)
treeb1864b4a7a1064f619288a57c73edcc2b4288d9d /legacy/eobj
parent03ccd0b0bf56efaad6cbc512c8b6906aaa6d27ee (diff)
Eo: further improved error reporting with bad func_set.
SVN revision: 71802
Diffstat (limited to 'legacy/eobj')
-rw-r--r--legacy/eobj/lib/eo.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/legacy/eobj/lib/eo.c b/legacy/eobj/lib/eo.c
index 8e7046817e..0e55e17976 100644
--- a/legacy/eobj/lib/eo.c
+++ b/legacy/eobj/lib/eo.c
@@ -756,16 +756,22 @@ eo_class_funcs_set(Eo_Class *klass, const Eo_Op_Func_Description *func_descs)
756 { 756 {
757 const Eo_Op_Description *op_desc = _eo_op_id_desc_get(itr->op); 757 const Eo_Op_Description *op_desc = _eo_op_id_desc_get(itr->op);
758 758
759 if (EINA_LIKELY(op_desc && (itr->op_type == op_desc->op_type))) 759 if (EINA_UNLIKELY(!op_desc || (itr->op == EO_NOOP)))
760 {
761 ERR("Setting implementation for non-existent op %x for class '%s'. Func index: %d", itr->op, klass->desc->name, itr - func_descs);
762 }
763 else if (EINA_LIKELY(itr->op_type == op_desc->op_type))
760 { 764 {
761 _dich_func_set(klass, itr->op, itr->func); 765 _dich_func_set(klass, itr->op, itr->func);
762 } 766 }
763 else 767 else
764 { 768 {
765 ERR("Set function's op type (%d) is different than the one in the op description (%d) for op '%s' in class '%s'.", itr->op_type, 769 ERR("Set function's op type (%d) is different than the one in the op description (%d) for op '%s' in class '%s'. Func index: %d",
770 itr->op_type,
766 (op_desc) ? op_desc->op_type : EO_OP_TYPE_REGULAR, 771 (op_desc) ? op_desc->op_type : EO_OP_TYPE_REGULAR,
767 (op_desc) ? op_desc->name : NULL, 772 (op_desc) ? op_desc->name : NULL,
768 klass->desc->name); 773 klass->desc->name,
774 itr - func_descs);
769 } 775 }
770 } 776 }
771 } 777 }