only throw for unknown attributes if in strict mode
This commit is contained in:
parent
372f384365
commit
e0608a4aa4
1 changed files with 9 additions and 1 deletions
|
@ -1623,7 +1623,15 @@ void map_parser::find_unused_nodes(xml_node const& root)
|
|||
find_unused_nodes_recursive(root, error_message);
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue