forked from enlightenment/efl
eo2: improved error messages on failed resolves.
This commit is contained in:
parent
7c0598c930
commit
5e92ffb121
|
@ -644,7 +644,7 @@ EAPI extern Eo2_Hook_Call eo2_hook_call_post;
|
|||
static Eo_Op op = EO_NOOP; \
|
||||
if ( op == EO_NOOP ) \
|
||||
op = eo2_api_op_id_get((void*)Name, Type); \
|
||||
if (!eo2_call_resolve(op, &call)) return DefRet; \
|
||||
if (!eo2_call_resolve(#Name, op, &call)) return DefRet; \
|
||||
__##Name##_func _func_ = (__##Name##_func) call.func; \
|
||||
|
||||
// to define an EAPI function
|
||||
|
@ -760,7 +760,7 @@ EAPI extern Eo2_Hook_Call eo2_hook_call_post;
|
|||
EAPI Eo_Op eo2_api_op_id_get(const void *api_func, const Eo_Op_Type);
|
||||
|
||||
// gets the real function pointer and the object data
|
||||
EAPI Eina_Bool eo2_call_resolve(const Eo_Op op, Eo2_Op_Call_Data *call);
|
||||
EAPI Eina_Bool eo2_call_resolve(const char *func_name, const Eo_Op op, Eo2_Op_Call_Data *call);
|
||||
|
||||
// start of eo2_do barrier, gets the object pointer and ref it, put it on the stask
|
||||
EAPI Eina_Bool eo2_do_start(const Eo *obj, const Eo_Class *cur_klass, const char *file, const char *func, int line);
|
||||
|
|
|
@ -441,7 +441,7 @@ eo2_do_end(const Eo **eo_id EINA_UNUSED)
|
|||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
eo2_call_resolve(const Eo_Op op, Eo2_Op_Call_Data *call)
|
||||
eo2_call_resolve(const char *func_name, const Eo_Op op, Eo2_Op_Call_Data *call)
|
||||
{
|
||||
Eo2_Stack_Frame *fptr;
|
||||
const _Eo_Object * obj;
|
||||
|
@ -455,7 +455,7 @@ eo2_call_resolve(const Eo_Op op, Eo2_Op_Call_Data *call)
|
|||
func = _dich_func_get(klass, op);
|
||||
if (EINA_UNLIKELY(func == NULL))
|
||||
{
|
||||
ERR("you called func %d which is unknown in class '%s'", op, klass->desc->name);
|
||||
ERR("you called func '%s' (%d) which is unknown in class '%s'", func_name, op, klass->desc->name);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
@ -485,7 +485,7 @@ eo2_call_resolve(const Eo_Op op, Eo2_Op_Call_Data *call)
|
|||
|
||||
if (func->src != NULL)
|
||||
{
|
||||
ERR("you called a pure virtual func %d", op);
|
||||
ERR("you called a pure virtual func '%s' (%d)", func_name, op);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ eo2_call_resolve(const Eo_Op op, Eo2_Op_Call_Data *call)
|
|||
}
|
||||
}
|
||||
|
||||
ERR("func %d could not be resolved in class '%s'", op, klass->desc->name);
|
||||
ERR("func '%s' (%d) could not be resolved in class '%s'", func_name, op, klass->desc->name);
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue