marker_cache: improve logging output

This commit is contained in:
Dane Springmeyer 2012-04-11 11:28:09 -07:00
parent 65f5909e93
commit d64d2555e1

View file

@ -102,9 +102,13 @@ boost::optional<marker_ptr> marker_cache::find(std::string const& uri, bool upda
} }
return result; return result;
} }
catch (std::exception const& ex)
{
MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading svg: '" << uri << "' (" << ex.what() << ")";
}
catch (...) catch (...)
{ {
MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading SVG: " << uri; MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading SVG: '" << uri << "'";
} }
} }
else 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)); 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 (...) catch (...)
{ {
MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading image: " << uri; MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading image: '" << uri << "'";
} }
} }
} }