From af6091db5a71ae7cd21a2d8348368d1917867bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Tue, 8 Jul 2014 14:38:49 -0700 Subject: update headless testing to be configurable --- src/style/style.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/style/style.cpp') diff --git a/src/style/style.cpp b/src/style/style.cpp index fc2364da81..006376172c 100644 --- a/src/style/style.cpp +++ b/src/style/style.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -102,6 +103,9 @@ void Style::loadJSON(const uint8_t *const data) { rapidjson::Document doc; doc.Parse<0>((const char *const)data); + if (doc.HasParseError()) { + throw error::style_parse(doc.GetErrorOffset(), doc.GetParseError()); + } StyleParser parser; parser.parse(const_cast(doc)); -- cgit v1.2.1