only throw for unknown attributes if in strict mode

This commit is contained in:
Dane Springmeyer 2012-08-16 16:10:23 -07:00
parent 372f384365
commit e0608a4aa4

View file

@ -1623,7 +1623,15 @@ void map_parser::find_unused_nodes(xml_node const& root)
find_unused_nodes_recursive(root, error_message); find_unused_nodes_recursive(root, error_message);
if (!error_message.str().empty()) if (!error_message.str().empty())
{ {
throw config_error("The following nodes or attributes were not processed while parsing the xml file:" + error_message.str()); std::string msg("The following nodes or attributes were not processed while parsing the xml file:" + error_message.str());
if (strict_)
{
throw config_error(msg);
}
else
{
MAPNIK_LOG_ERROR(load_map) << "map_parser: " << msg;
}
} }
} }