make parser strict - return marker_null() on SVG parser failures

redirect stderr to MAPNIK_LOG
This commit is contained in:
artemp 2015-07-31 10:44:42 +02:00
parent 0cc524aa1c
commit 3a4d57492f

View file

@ -180,9 +180,9 @@ std::shared_ptr<mapnik::marker const> marker_cache::find(std::string const& uri,
{
for (auto const& msg : p.error_messages())
{
std::cerr << "SVG PARSING ERROR:\"" << msg << "\"" << std::endl;
MAPNIK_LOG_ERROR(marker_cache) << "SVG PARSING ERROR:\"" << msg << "\"";
}
//return std::make_shared<mapnik::marker const>(mapnik::marker_null());
return std::make_shared<mapnik::marker const>(mapnik::marker_null());
}
//svg.arrange_orientations();
double lox,loy,hix,hiy;
@ -221,9 +221,9 @@ std::shared_ptr<mapnik::marker const> marker_cache::find(std::string const& uri,
{
for (auto const& msg : p.error_messages())
{
std::cerr << "SVG PARSING ERROR:\"" << msg << "\"" << std::endl;
MAPNIK_LOG_ERROR(marker_cache) << "SVG PARSING ERROR:\"" << msg << "\"";
}
//return std::make_shared<mapnik::marker const>(mapnik::marker_null());
return std::make_shared<mapnik::marker const>(mapnik::marker_null());
}
//svg.arrange_orientations();
double lox,loy,hix,hiy;