Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json/XML Archive improvement #321

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hained error messages when xml parsing of a nvp fails
  • Loading branch information
Christopher Bläsius committed Jul 28, 2016
commit b9844f2c04a4b972ebf6c8e9aaf7da414d35ab20
9 changes: 7 additions & 2 deletions include/cereal/archives/xml.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,13 @@ namespace cereal
template <class T> inline
void CEREAL_LOAD_FUNCTION_NAME( XMLInputArchive & ar, NameValuePair<T> & t )
{
ar.setNextName( t.name );
ar( t.value );
try {
ar.setNextName( t.name );
ar( t.value );
}
catch (std::exception const & e) {
throw Exception("XML Parsing for NVP (" + std::string(searchName) + ") failed. Error: " + e.what());
}
}

// ######################################################################
Expand Down