Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
die verbosely when the content of a filesystem is not found, instead of an infinite...
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 3 Mar 2020 08:08:01 +0000 (09:08 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 3 Mar 2020 08:08:01 +0000 (09:08 +0100)
src/plugins/file_system/s4u_FileSystem.cpp

index d6eb6a7..a9b1bee 100644 (file)
@@ -502,6 +502,8 @@ std::map<std::string, sg_size_t>* FileSystemDiskExt::parse_content(const std::st
   std::map<std::string, sg_size_t>* parse_content = new std::map<std::string, sg_size_t>();
 
   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<std::string> tokens;