forked from enlightenment/efl
Eolian/Lexer: error handling
Print and return error if no class has been parsed in the given file.
This commit is contained in:
parent
e5be817b7f
commit
b013815bfd
|
@ -4229,6 +4229,12 @@ eo_tokenizer_database_fill(const char *filename)
|
|||
|
||||
if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end;
|
||||
|
||||
if (!toknz->classes)
|
||||
{
|
||||
ERR("No classes for file %s", filename);
|
||||
goto end;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(toknz->classes, k, kls)
|
||||
{
|
||||
database_class_add(kls->name, kls->type);
|
||||
|
|
|
@ -1223,6 +1223,12 @@ eo_tokenizer_database_fill(const char *filename)
|
|||
|
||||
if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end;
|
||||
|
||||
if (!toknz->classes)
|
||||
{
|
||||
ERR("No classes for file %s", filename);
|
||||
goto end;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(toknz->classes, k, kls)
|
||||
{
|
||||
database_class_add(kls->name, kls->type);
|
||||
|
|
Loading…
Reference in New Issue