Skip to content

Commit

Permalink
marker_cache: improve logging output
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Apr 11, 2012
1 parent 65f5909 commit d64d255
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/marker_cache.cpp
Expand Up @@ -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
Expand All @@ -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 << "'";
} }
} }
} }
Expand Down

0 comments on commit d64d255

Please sign in to comment.