diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-07-08 14:38:49 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-07-08 14:38:49 -0700 |
commit | af6091db5a71ae7cd21a2d8348368d1917867bab (patch) | |
tree | 9704f82eff1f638dfbc02d6ba5e76afad878e0fb /src/style/style.cpp | |
parent | 4c75c696b3162c72e7dec21ce0b3f69cae9d1034 (diff) | |
download | qtlocation-mapboxgl-af6091db5a71ae7cd21a2d8348368d1917867bab.tar.gz |
update headless testing to be configurable
Diffstat (limited to 'src/style/style.cpp')
-rw-r--r-- | src/style/style.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 <llmr/style/style_bucket.hpp> #include <llmr/util/constants.hpp> #include <llmr/util/time.hpp> +#include <llmr/util/error.hpp> #include <csscolorparser/csscolorparser.hpp> #include <rapidjson/document.h> @@ -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<const rapidjson::Document &>(doc)); |