diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-08-24 17:38:06 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-08-24 20:02:31 +0300 |
commit | c98f4f476bd590bdfd78409d428459e40347302a (patch) | |
tree | 6c4bc14970ba0bf199e36156e3bc529a6d054a61 /src/mbgl/style/parser.hpp | |
parent | 646528bc53c37950b556be825de1ba9fa5303be3 (diff) | |
download | qtlocation-mapboxgl-c98f4f476bd590bdfd78409d428459e40347302a.tar.gz |
[core] Emit MapChangeDidFailLoadingMap when the style cannot be loaded or parsed
Currently this signal is never emitted, which can cause the Still mode
to starve in case of an invalid style or failed request.
Diffstat (limited to 'src/mbgl/style/parser.hpp')
-rw-r--r-- | src/mbgl/style/parser.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mbgl/style/parser.hpp b/src/mbgl/style/parser.hpp index a6a71ed817..a05a0b316a 100644 --- a/src/mbgl/style/parser.hpp +++ b/src/mbgl/style/parser.hpp @@ -9,6 +9,7 @@ #include <vector> #include <memory> +#include <stdexcept> #include <string> #include <unordered_map> #include <forward_list> @@ -16,11 +17,13 @@ namespace mbgl { namespace style { +using StyleParseResult = std::exception_ptr; + class Parser { public: ~Parser(); - void parse(const std::string&); + StyleParseResult parse(const std::string&); std::string spriteURL; std::string glyphURL; |