Commit 77d3df03 authored by Max Lyon's avatar Max Lyon

Merge branch 'mheistermann/OpenVolumeMesh-serialization-errhandling'

parents 13fa0e32 ce70a000
Pipeline #3023 passed with stage
in 3 minutes and 44 seconds
...@@ -513,8 +513,15 @@ void FileManager::writeProps(std::ostream& _ostr, const IteratorT& _begin, const ...@@ -513,8 +513,15 @@ void FileManager::writeProps(std::ostream& _ostr, const IteratorT& _begin, const
continue; continue;
} }
std::string type_name;
try {
type_name = (*p_it)->typeNameWrapper();
} catch (std::runtime_error &e) { // type not serializable
std::cerr << "Failed to save property, skipping: " << e.what() << std::endl;
continue;
}
_ostr << (*p_it)->entityType() << " "; _ostr << (*p_it)->entityType() << " ";
_ostr << (*p_it)->typeNameWrapper() << " "; _ostr << type_name << " ";
_ostr << "\"" << (*p_it)->name() << "\"" << std::endl; _ostr << "\"" << (*p_it)->name() << "\"" << std::endl;
(*p_it)->serialize(_ostr); (*p_it)->serialize(_ostr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment