From 963cd83f98d63d2e2e2b69a23b71620275c610c3 Mon Sep 17 00:00:00 2001 From: Carl Simonson Date: Thu, 31 May 2012 18:09:12 -0500 Subject: [PATCH] viewer: show more exception messages When trying to render the map widget in the viewer, we catch exceptions and print out the message to stderr. The only exceptions that are printed are mapnik::config_error messages. mapnik can throw more errors, so this change makes it catch all std::exceptions. --- demo/viewer/mapwidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/demo/viewer/mapwidget.cpp b/demo/viewer/mapwidget.cpp index 0ad0f28ce..8717cf4a8 100644 --- a/demo/viewer/mapwidget.cpp +++ b/demo/viewer/mapwidget.cpp @@ -486,6 +486,10 @@ void render_agg(mapnik::Map const& map, double scaling_factor, QPixmap & pix) { std::cerr << ex.what() << std::endl; } + catch (const std::exception & ex) + { + std::cerr << "exception: " << ex.what() << std::endl; + } catch (...) { std::cerr << "Unknown exception caught!\n"; @@ -522,6 +526,10 @@ void render_grid(mapnik::Map const& map, double scaling_factor, QPixmap & pix) { std::cerr << ex.what() << std::endl; } + catch (const std::exception & ex) + { + std::cerr << "exception: " << ex.what() << std::endl; + } catch (...) { std::cerr << "Unknown exception caught!\n";