forked from enlightenment/efl
proper error output from script running (embryo).
SVN revision: 52942
This commit is contained in:
parent
307190c594
commit
3d87542724
|
@ -3032,17 +3032,29 @@ _edje_embryo_test_run(Edje *ed, const char *fname, const char *sig, const char *
|
|||
if (ret == EMBRYO_PROGRAM_FAIL)
|
||||
{
|
||||
ERR("ERROR with embryo script.\n"
|
||||
"OBJECT NAME: %s\n"
|
||||
"OBJECT FILE: %s\n"
|
||||
"ENTRY POINT: %s\n"
|
||||
"SIGNAL/SRC: %s / %s\n"
|
||||
"ERROR: %s",
|
||||
ed->collection->part,
|
||||
ed->file->path,
|
||||
fname,
|
||||
sig, src,
|
||||
embryo_error_string_get(embryo_program_error_get(ed->collection->script)));
|
||||
}
|
||||
else if (ret == EMBRYO_PROGRAM_TOOLONG)
|
||||
{
|
||||
ERR("ERROR with embryo script.\n"
|
||||
"OBJECT NAME: %s\n"
|
||||
"OBJECT FILE: %s\n"
|
||||
"ENTRY POINT: %s\n"
|
||||
"SIGNAL/SRC: %s / %s\n"
|
||||
"ERROR: Script exceeded maximum allowed cycle count of %i",
|
||||
ed->collection->part,
|
||||
ed->file->path,
|
||||
fname,
|
||||
sig, src,
|
||||
embryo_program_max_cycle_run_get(ed->collection->script));
|
||||
}
|
||||
embryo_program_data_set(ed->collection->script, pdata);
|
||||
|
|
|
@ -642,6 +642,7 @@ _edje_message_process(Edje_Message *em)
|
|||
{
|
||||
Embryo_Function fn;
|
||||
void *pdata;
|
||||
int ret;
|
||||
|
||||
/* signals are only handled one way */
|
||||
if (em->type == EDJE_MESSAGE_SIGNAL)
|
||||
|
@ -683,7 +684,32 @@ _edje_message_process(Edje_Message *em)
|
|||
pdata = embryo_program_data_get(em->edje->collection->script);
|
||||
embryo_program_data_set(em->edje->collection->script, em->edje);
|
||||
embryo_program_max_cycle_run_set(em->edje->collection->script, 5000000);
|
||||
embryo_program_run(em->edje->collection->script, fn);
|
||||
ret = embryo_program_run(em->edje->collection->script, fn);
|
||||
if (ret == EMBRYO_PROGRAM_FAIL)
|
||||
{
|
||||
ERR("ERROR with embryo script.\n"
|
||||
"OBJECT NAME: %s\n"
|
||||
"OBJECT FILE: %s\n"
|
||||
"ENTRY POINT: %s\n"
|
||||
"ERROR: %s",
|
||||
em->edje->collection->part,
|
||||
em->edje->file->path,
|
||||
"message",
|
||||
embryo_error_string_get(embryo_program_error_get(em->edje->collection->script)));
|
||||
}
|
||||
else if (ret == EMBRYO_PROGRAM_TOOLONG)
|
||||
{
|
||||
ERR("ERROR with embryo script.\n"
|
||||
"OBJECT NAME: %s\n"
|
||||
"OBJECT FILE: %s\n"
|
||||
"ENTRY POINT: %s\n"
|
||||
"ERROR: Script exceeded maximum allowed cycle count of %i",
|
||||
em->edje->collection->part,
|
||||
em->edje->file->path,
|
||||
"message",
|
||||
embryo_program_max_cycle_run_get(em->edje->collection->script));
|
||||
}
|
||||
|
||||
embryo_program_data_set(em->edje->collection->script, pdata);
|
||||
embryo_program_vm_pop(em->edje->collection->script);
|
||||
}
|
||||
|
|
|
@ -619,17 +619,25 @@ _call_fn(Edje * ed, const char *fname, Embryo_Function fn)
|
|||
if (ret == EMBRYO_PROGRAM_FAIL)
|
||||
{
|
||||
ERR("ERROR with embryo script.\n"
|
||||
"OBJECT NAME: %s\n"
|
||||
"OBJECT FILE: %s\n"
|
||||
"ENTRY POINT: %s\n"
|
||||
"ERROR: %s",
|
||||
ed->collection->part,
|
||||
ed->file->path,
|
||||
fname,
|
||||
embryo_error_string_get(embryo_program_error_get
|
||||
(ed->collection->script)));
|
||||
embryo_error_string_get(embryo_program_error_get(ed->collection->script)));
|
||||
}
|
||||
else if (ret == EMBRYO_PROGRAM_TOOLONG)
|
||||
{
|
||||
ERR("ERROR with embryo script.\n"
|
||||
"OBJECT NAME: %s\n"
|
||||
"OBJECT FILE: %s\n"
|
||||
"ENTRY POINT: %s\n"
|
||||
"ERROR: Script exceeded maximum allowed cycle count of %i",
|
||||
fname, embryo_program_max_cycle_run_get(ed->collection->script));
|
||||
ed->collection->part,
|
||||
ed->file->path,
|
||||
fname,
|
||||
embryo_program_max_cycle_run_get(ed->collection->script));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,11 +25,32 @@ _edje_var_timer_cb(void *data)
|
|||
free(et);
|
||||
{
|
||||
void *pdata;
|
||||
int ret;
|
||||
|
||||
pdata = embryo_program_data_get(ed->collection->script);
|
||||
embryo_program_data_set(ed->collection->script, ed);
|
||||
embryo_program_max_cycle_run_set(ed->collection->script, 5000000);
|
||||
embryo_program_run(ed->collection->script, fn);
|
||||
ret = embryo_program_run(ed->collection->script, fn);
|
||||
if (ret == EMBRYO_PROGRAM_FAIL)
|
||||
{
|
||||
ERR("ERROR with embryo script (timer callback).\n"
|
||||
"OBJECT NAME: %s\n"
|
||||
"OBJECT FILE: %s\n"
|
||||
"ERROR: %s",
|
||||
ed->collection->part,
|
||||
ed->file->path,
|
||||
embryo_error_string_get(embryo_program_error_get(ed->collection->script)));
|
||||
}
|
||||
else if (ret == EMBRYO_PROGRAM_TOOLONG)
|
||||
{
|
||||
ERR("ERROR with embryo script (timer callback).\n"
|
||||
"OBJECT NAME: %s\n"
|
||||
"OBJECT FILE: %s\n"
|
||||
"ERROR: Script exceeded maximum allowed cycle count of %i",
|
||||
ed->collection->part,
|
||||
ed->file->path,
|
||||
embryo_program_max_cycle_run_get(ed->collection->script));
|
||||
}
|
||||
embryo_program_data_set(ed->collection->script, pdata);
|
||||
embryo_program_vm_pop(ed->collection->script);
|
||||
_edje_recalc(ed);
|
||||
|
@ -74,6 +95,7 @@ _edje_var_anim_cb(void *data __UNUSED__)
|
|||
{
|
||||
Embryo_Function fn;
|
||||
float v;
|
||||
int ret;
|
||||
|
||||
v = (t - ea->start) / ea->len;
|
||||
if (v > 1.0) v= 1.0;
|
||||
|
@ -89,6 +111,27 @@ _edje_var_anim_cb(void *data __UNUSED__)
|
|||
pdata = embryo_program_data_get(ed->collection->script);
|
||||
embryo_program_data_set(ed->collection->script, ed);
|
||||
embryo_program_max_cycle_run_set(ed->collection->script, 5000000);
|
||||
ret = embryo_program_run(ed->collection->script, fn);
|
||||
if (ret == EMBRYO_PROGRAM_FAIL)
|
||||
{
|
||||
ERR("ERROR with embryo script (anim callback).\n"
|
||||
"OBJECT NAME: %s\n"
|
||||
"OBJECT FILE: %s\n"
|
||||
"ERROR: %s",
|
||||
ed->collection->part,
|
||||
ed->file->path,
|
||||
embryo_error_string_get(embryo_program_error_get(ed->collection->script)));
|
||||
}
|
||||
else if (ret == EMBRYO_PROGRAM_TOOLONG)
|
||||
{
|
||||
ERR("ERROR with embryo script (anim callback).\n"
|
||||
"OBJECT NAME: %s\n"
|
||||
"OBJECT FILE: %s\n"
|
||||
"ERROR: Script exceeded maximum allowed cycle count of %i",
|
||||
ed->collection->part,
|
||||
ed->file->path,
|
||||
embryo_program_max_cycle_run_get(ed->collection->script));
|
||||
}
|
||||
embryo_program_run(ed->collection->script, fn);
|
||||
embryo_program_data_set(ed->collection->script, pdata);
|
||||
embryo_program_vm_pop(ed->collection->script);
|
||||
|
|
Loading…
Reference in New Issue