Eolian/Lexer: error handling

Print and return error if no class has been parsed in the given file.
This commit is contained in:
Daniel Zaoui 2014-03-09 12:02:46 +02:00
parent e5be817b7f
commit b013815bfd
2 changed files with 12 additions and 0 deletions

View File

@ -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);

View File

@ -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);