From f34f3787d3021e37e6055b13bd7dd9adf035ae89 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 3 Mar 2020 09:08:01 +0100 Subject: [PATCH] die verbosely when the content of a filesystem is not found, instead of an infinite loop --- src/plugins/file_system/s4u_FileSystem.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.20.1