Skip to content
Snippets Groups Projects
Commit ca943a75 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[App/U] Add useful messages for not read meshes.

parent 81c140d3
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,12 @@ std::vector<std::unique_ptr<MeshLib::Mesh>> readMeshes( ...@@ -26,7 +26,12 @@ std::vector<std::unique_ptr<MeshLib::Mesh>> readMeshes(
for (auto const& filename : filenames) for (auto const& filename : filenames)
{ {
meshes.emplace_back(MeshLib::IO::readMeshFromFile(filename)); auto mesh = MeshLib::IO::readMeshFromFile(filename);
if (mesh == nullptr)
{
OGS_FATAL("Could not read mesh from '%s' file.", filename.c_str());
}
meshes.emplace_back(mesh);
} }
if (meshes.empty()) if (meshes.empty())
{ {
...@@ -95,6 +100,11 @@ int main(int argc, char* argv[]) ...@@ -95,6 +100,11 @@ int main(int argc, char* argv[])
// //
std::unique_ptr<MeshLib::Mesh> bulk_mesh{ std::unique_ptr<MeshLib::Mesh> bulk_mesh{
MeshLib::IO::readMeshFromFile(bulk_mesh_arg.getValue())}; MeshLib::IO::readMeshFromFile(bulk_mesh_arg.getValue())};
if (bulk_mesh == nullptr)
{
OGS_FATAL("Could not read bulk mesh from '%s'",
bulk_mesh_arg.getValue().c_str());
}
// //
// Read the subdomain meshes. // Read the subdomain meshes.
......
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