From: Martin Quinson Date: Tue, 3 Mar 2020 08:08:01 +0000 (+0100) Subject: die verbosely when the content of a filesystem is not found, instead of an infinite... X-Git-Tag: v3.26~845 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f34f3787d3021e37e6055b13bd7dd9adf035ae89 die verbosely when the content of a filesystem is not found, instead of an infinite loop --- diff --git a/src/plugins/file_system/s4u_FileSystem.cpp b/src/plugins/file_system/s4u_FileSystem.cpp index d6eb6a7227..a9b1bee5f8 100644 --- a/src/plugins/file_system/s4u_FileSystem.cpp +++ b/src/plugins/file_system/s4u_FileSystem.cpp @@ -502,6 +502,8 @@ std::map* FileSystemDiskExt::parse_content(const std::st std::map* parse_content = new std::map(); std::ifstream* fs = surf_ifsopen(filename); + xbt_assert(not fs->fail(), "Cannot open file '%s' (path=%s)", filename.c_str(), + (boost::join(surf_path, ":")).c_str()); std::string line; std::vector tokens;