Skip to content

Commit

Permalink
validator: Make missing attribute error format more consistent with t…
Browse files Browse the repository at this point in the history
…he rest

Instead of:
> In tag slider_definition which begins here,  missing key id

Use:
> Missing key 'id=' in tag [slider_definition]

Since otherwise the wording is very awkward with the new format (the
file:line line comes after the error), all other key-related messages
use "'key='" to denote attribute names, and there's a double-blank typo
that was there even before I first touched this code.
  • Loading branch information
irydacea committed Jun 19, 2014
1 parent b58a2d6 commit 0e8b3af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/serialization/schema_validator.cpp
Expand Up @@ -95,8 +95,8 @@ static void missing_key_error(const std::string & file, int line,
const std::string & tag,const std::string & key,
bool flag_exception){
std::ostringstream ss;
ss << "In tag " << tag
<< " which begins here, " << " missing key " << key << "\n"
ss << "Missing key '" << key << "=' in tag [" << tag
<< "]\n"
<< at(file, line) << "\n";
print_output (ss.str (),flag_exception);
}
Expand Down

0 comments on commit 0e8b3af

Please sign in to comment.