Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Duplicate assert (taken from FileSystemDiskExt::parse_content).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 3 Mar 2020 22:27:47 +0000 (23:27 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 4 Mar 2020 12:40:37 +0000 (13:40 +0100)
src/plugins/file_system/s4u_FileSystem.cpp

index a9b1bee..e6a7b28 100644 (file)
@@ -531,6 +531,8 @@ std::map<std::string, sg_size_t>* FileSystemStorageExt::parse_content(const std:
   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;