Skip to content

Commit

Permalink
Add desired NVP name to NVP not found error for json/xml
Browse files Browse the repository at this point in the history
see #226
  • Loading branch information
AzothAmmo committed Jan 27, 2016
1 parent 0f8e40e commit 6c1b3f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/cereal/archives/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ namespace cereal
}
}

throw Exception("JSON Parsing failed - provided NVP not found");
throw Exception("JSON Parsing failed - provided NVP (" + std::string(searchName) + ") not found");
}

private:
Expand Down
2 changes: 1 addition & 1 deletion include/cereal/archives/xml.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ namespace cereal
next = itsNodes.top().search( expectedName );

if( next == nullptr )
throw Exception("XML Parsing failed - provided NVP not found");
throw Exception("XML Parsing failed - provided NVP (" + std::string(expectedName) + ") not found");
}

itsNodes.emplace( next );
Expand Down

0 comments on commit 6c1b3f7

Please sign in to comment.