Permalink
Browse files

further improve the reporting of unprocessed nodes and attributes - r…

…efs #1441
  • Loading branch information...
1 parent 03860b1 commit 1ca4bcf78da7e714ffd0f77bfdc54833d5592b7a @springmeyer springmeyer committed Aug 23, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/load_map.cpp
View
8 src/load_map.cpp
@@ -1636,14 +1636,14 @@ void map_parser::find_unused_nodes(xml_node const& root)
find_unused_nodes_recursive(root, error_message);
if (!error_message.str().empty())
{
- std::string msg("The following nodes or attributes were not processed while parsing the xml file:" + error_message.str());
+ std::string msg("Unable to process some data while parsing '" + filename_ + "':" + error_message.str());
if (strict_)
{
throw config_error(msg);
}
else
{
- MAPNIK_LOG_ERROR(load_map) << "map_parser: " << msg;
+ MAPNIK_LOG_ERROR(load_map) << msg;
}
}
}
@@ -1655,7 +1655,7 @@ void map_parser::find_unused_nodes_recursive(xml_node const& node, std::stringst
if (node.is_text()) {
error_message << "\n* text '" << node.text() << "'";
} else {
- error_message << "\n* node '" << node.name() << "' in line " << node.line();
+ error_message << "\n* node '" << node.name() << "' at line " << node.line();
}
return; //All attributes and children are automatically unprocessed, too.
}
@@ -1668,7 +1668,7 @@ void map_parser::find_unused_nodes_recursive(xml_node const& node, std::stringst
{
error_message << "\n* attribute '" << aitr->first <<
"' with value '" << aitr->second.value <<
- "' in line " << node.line();
+ "' at line " << node.line();
}
}
xml_node::const_iterator itr = node.begin();

0 comments on commit 1ca4bcf

Please sign in to comment.