jeyzu pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0b97c11ea25b2868e151b1aecc8dec7218dc352e
commit 0b97c11ea25b2868e151b1aecc8dec7218dc352e Author: Jérémy Zurcher <[email protected]> Date: Thu May 8 13:44:47 2014 +0200 eo: improve error reporting, update tests --- src/lib/eo/eo.c | 9 +++++---- src/tests/eo/suite/eo_test_call_errors.c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index b52a47a..59865e6 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -627,8 +627,8 @@ _eo_call_resolve(const char *func_name, const Eo_Op op, Eo_Op_Call_Data *call, c if (func->src != NULL) { - ERR("in %s:%d: you called a pure virtual func '%s' (%d).", - file, line, func_name, op); + ERR("in %s:%d: you called a pure virtual func '%s' (%d) of class '%s'.", + file, line, func_name, op, klass->desc->name); return EINA_FALSE; } @@ -758,8 +758,9 @@ _eo_api_op_id_get(const void *api_func, const char *file, int line) if (dladdr(api_func, &info) != 0) fct_name = info.dli_sname; #endif - ERR("in %s:%d: unable to resolve %s api func '%s' %p.", - file, line, (class_ref ? "class" : "regular"), fct_name, api_func); + ERR("in %s:%d: unable to resolve %s api func '%s' %p in class '%s'.", + file, line, (class_ref ? "class" : "regular"), + fct_name, api_func, klass->desc->name); return EO_NOOP; } diff --git a/src/tests/eo/suite/eo_test_call_errors.c b/src/tests/eo/suite/eo_test_call_errors.c index 08e1635..7e00fc1 100644 --- a/src/tests/eo/suite/eo_test_call_errors.c +++ b/src/tests/eo/suite/eo_test_call_errors.c @@ -19,7 +19,7 @@ START_TEST(eo_pure_virtual_fct_call) Eo *obj = eo_add(SIMPLE_CLASS, NULL); fail_if(!obj); - TEST_EO_ERROR("_eo_call_resolve", "in %s:%d: you called a pure virtual func '%s' (%d)."); + TEST_EO_ERROR("_eo_call_resolve", "in %s:%d: you called a pure virtual func '%s' (%d) of class '%s'."); eo_do(obj, simple_pure_virtual()); fail_unless(ctx.did); @@ -37,7 +37,7 @@ START_TEST(eo_api_not_implemented_call) Eo *obj = eo_add(SIMPLE_CLASS, NULL); fail_if(!obj); - TEST_EO_ERROR("_eo_api_op_id_get", "in %s:%d: unable to resolve %s api func %p."); + TEST_EO_ERROR("_eo_api_op_id_get", "in %s:%d: unable to resolve %s api func '%s' %p in class '%s'."); eo_do(obj, simple_no_implementation()); fail_unless(ctx.did); --
