From e0608a4aa4d8fda66a06e56ff632531f866c5b37 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 16 Aug 2012 16:10:23 -0700 Subject: [PATCH] only throw for unknown attributes if in strict mode --- src/load_map.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/load_map.cpp b/src/load_map.cpp index 0dfc01de9..bc9b2ec51 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -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; + } } }