forked from len0rd/rockbox
checkwps: show a helpful error if the parser callback errors out
Change-Id: Ie3e35292ba8d74f0ff3d1bb3483a5e83aae0e6b6
This commit is contained in:
parent
657b91acfa
commit
d76dca165b
4 changed files with 14 additions and 4 deletions
|
@ -546,7 +546,10 @@ static int skin_parse_tag(struct skin_element* element, const char** document)
|
|||
if (callback)
|
||||
{
|
||||
if (callback(element, callback_data) == CALLBACK_ERROR)
|
||||
{
|
||||
skin_error(GOT_CALLBACK_ERROR, cursor);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
*document = cursor;
|
||||
|
@ -822,7 +825,10 @@ static int skin_parse_tag(struct skin_element* element, const char** document)
|
|||
if (callback)
|
||||
{
|
||||
if (callback(element, callback_data) == CALLBACK_ERROR)
|
||||
{
|
||||
skin_error(GOT_CALLBACK_ERROR, *document);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
*document = cursor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue