From: Martin Quinson Date: Sun, 21 May 2017 14:58:11 +0000 (+0200) Subject: loudly fail when asked to replay a non-existing file X-Git-Tag: v3.16~283 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0ffc4789aa9f3b4e65a1fb9916a420697ac5a4c5 loudly fail when asked to replay a non-existing file --- diff --git a/src/smpi/smpi_replay.cpp b/src/smpi/smpi_replay.cpp index ada1fecf98..e226821ad7 100644 --- a/src/smpi/smpi_replay.cpp +++ b/src/smpi/smpi_replay.cpp @@ -106,6 +106,7 @@ static MPI_Datatype decode_datatype(const char *const action) break; default: MPI_CURRENT_TYPE=MPI_DEFAULT_TYPE; + break; } return MPI_CURRENT_TYPE; } diff --git a/src/xbt/xbt_replay.cpp b/src/xbt/xbt_replay.cpp index 408c7f4a13..86f8c7c9d8 100644 --- a/src/xbt/xbt_replay.cpp +++ b/src/xbt/xbt_replay.cpp @@ -34,7 +34,9 @@ class ReplayReader { public: explicit ReplayReader(const char* filename) { - fs = new std::ifstream(filename, std::ifstream::in); + XBT_VERB("Prepare to replay file '%s'", filename); + fs = new std::ifstream(filename, std::ifstream::in); + xbt_assert(fs->is_open(), "Cannot read file %s", filename); } ~ReplayReader() {