From d64d2555e1a3ad4d8c94eae3b2e64eab47550adf Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 11 Apr 2012 11:28:09 -0700 Subject: [PATCH] marker_cache: improve logging output --- src/marker_cache.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/marker_cache.cpp b/src/marker_cache.cpp index af736ba3f..6ccb651c9 100644 --- a/src/marker_cache.cpp +++ b/src/marker_cache.cpp @@ -102,9 +102,13 @@ boost::optional marker_cache::find(std::string const& uri, bool upda } return result; } + catch (std::exception const& ex) + { + MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading svg: '" << uri << "' (" << ex.what() << ")"; + } catch (...) { - MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading SVG: " << uri; + MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading SVG: '" << uri << "'"; } } else @@ -126,11 +130,18 @@ boost::optional marker_cache::find(std::string const& uri, bool upda cache_.insert(std::make_pair(uri,*result)); } } + else + { + MAPNIK_LOG_ERROR(marker_cache) << "could not intialize reader for: '" << uri << "'"; + } + } + catch (std::exception const& ex) + { + MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading image: '" << uri << "' (" << ex.what() << ")"; } - catch (...) { - MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading image: " << uri; + MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading image: '" << uri << "'"; } } }