diff options
Diffstat (limited to 'src/mbgl/style')
-rw-r--r-- | src/mbgl/style/conversion/json.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/style/parser.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/style/style_impl.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/style/conversion/json.hpp b/src/mbgl/style/conversion/json.hpp index 503f60a382..4e7ad9479a 100644 --- a/src/mbgl/style/conversion/json.hpp +++ b/src/mbgl/style/conversion/json.hpp @@ -15,7 +15,7 @@ optional<T> convertJSON(const std::string& json, Error& error, Args&&...args) { document.Parse<0>(json.c_str()); if (document.HasParseError()) { - error = { formatJSONParseError(document) }; + error = { formatJSONParseError(json, document) }; return {}; } diff --git a/src/mbgl/style/parser.cpp b/src/mbgl/style/parser.cpp index ae298bd915..2d3d251bc3 100644 --- a/src/mbgl/style/parser.cpp +++ b/src/mbgl/style/parser.cpp @@ -29,7 +29,7 @@ StyleParseResult Parser::parse(const std::string& json) { document.Parse<0>(json.c_str()); if (document.HasParseError()) { - return std::make_exception_ptr(std::runtime_error(formatJSONParseError(document))); + return std::make_exception_ptr(std::runtime_error(formatJSONParseError(json, document))); } if (!document.IsObject()) { diff --git a/src/mbgl/style/style_impl.cpp b/src/mbgl/style/style_impl.cpp index fde5aa632d..8aa5f0c44b 100644 --- a/src/mbgl/style/style_impl.cpp +++ b/src/mbgl/style/style_impl.cpp @@ -77,7 +77,7 @@ void Style::Impl::parse(const std::string& json_) { Parser parser; if (auto error = parser.parse(json_)) { - std::string message = "Failed to parse style: " + util::toString(error); + std::string message = "Failed to parse style " + util::toString(error); Log::Error(Event::ParseStyle, message.c_str()); observer->onStyleError(std::make_exception_ptr(util::StyleParseException(message))); observer->onResourceError(error); |