From f0d4411871d43012dc9e24a376ebc70ec6ca9224 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 6 Feb 2017 14:52:17 -0800 Subject: [PATCH] [node] Temporary: exit(0) on exception in Painter::render Hope to get complete apitrace with a clean exit rather than an abort. --- src/mbgl/map/map.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index e9d4d9e24..727fdf6d4 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include 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);