Permalink
Browse files

marker_cache: improve logging output

  • Loading branch information...
1 parent 65f5909 commit d64d2555e1a3ad4d8c94eae3b2e64eab47550adf Dane Springmeyer committed Apr 11, 2012
Showing with 14 additions and 3 deletions.
  1. +14 −3 src/marker_cache.cpp
View
@@ -102,9 +102,13 @@ boost::optional<marker_ptr> 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_ptr> 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 << "'";
}
}
}

0 comments on commit d64d255

Please sign in to comment.