From d76dca165bd3312d78df7f6794d5fbab7f634ecd Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 26 Feb 2013 21:12:00 +1100 Subject: checkwps: show a helpful error if the parser callback errors out Change-Id: Ie3e35292ba8d74f0ff3d1bb3483a5e83aae0e6b6 --- lib/skin_parser/skin_parser.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/skin_parser/skin_parser.c') diff --git a/lib/skin_parser/skin_parser.c b/lib/skin_parser/skin_parser.c index 1f4b87a328..39a41e9dd3 100644 --- a/lib/skin_parser/skin_parser.c +++ b/lib/skin_parser/skin_parser.c @@ -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; -- cgit v1.2.3