Skip to content
Snippets Groups Projects
Commit 98eb7d7e authored by Tom Fischer's avatar Tom Fischer Committed by Lars Bilke
Browse files

[MeL/IO] Check res. of mesh writing; report error.

parent 8f5a3d45
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,13 @@ int writeMeshToFile(const MeshLib::Mesh &mesh, const std::string &file_name) ...@@ -34,7 +34,13 @@ int writeMeshToFile(const MeshLib::Mesh &mesh, const std::string &file_name)
if (BaseLib::hasFileExtension("vtu", file_name)) if (BaseLib::hasFileExtension("vtu", file_name))
{ {
MeshLib::IO::VtuInterface writer(&mesh); MeshLib::IO::VtuInterface writer(&mesh);
writer.writeToFile(file_name); auto const result = writer.writeToFile(file_name);
if (!result)
{
ERR("writeMeshToFile(): Could not write mesh to '%s'.",
file_name.c_str());
return -1;
}
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment