summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-02-06 14:52:17 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-06 17:57:37 -0600
commitf0d4411871d43012dc9e24a376ebc70ec6ca9224 (patch)
tree569ff81071e839780bd2fa6919ff55ea785295f7 /src
parent7b0881030fdc60130458c2a798de696888c87c7c (diff)
downloadqtlocation-mapboxgl-f0d4411871d43012dc9e24a376ebc70ec6ca9224.tar.gz
[node] Temporary: exit(0) on exception in Painter::render
Hope to get complete apitrace with a clean exit rather than an abort.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index e9d4d9e247..727fdf6d40 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -24,6 +24,7 @@
#include <mbgl/util/tile_coordinate.hpp>
#include <mbgl/actor/scheduler.hpp>
#include <mbgl/util/logging.hpp>
+#include <mbgl/util/string.hpp>
#include <mbgl/math/log2.hpp>
namespace mbgl {
@@ -314,10 +315,15 @@ void Map::Impl::render(View& view) {
contextMode,
debugOptions };
- painter->render(*style,
- frameData,
- view,
- annotationManager->getSpriteAtlas());
+ try {
+ painter->render(*style,
+ frameData,
+ view,
+ annotationManager->getSpriteAtlas());
+ } catch (...) {
+ Log::Error(Event::General, "Exception in render: %s", util::toString(std::current_exception()).c_str());
+ exit(1);
+ }
auto request = std::move(stillImageRequest);
request->callback(nullptr);