From: Arnaud Giersch Date: Mon, 6 Nov 2017 20:23:35 +0000 (+0100) Subject: Use a more specific exception. X-Git-Tag: v3.18~242^2~72 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/538731caed0c492e259c5f0b02a31c43037c1a5f Use a more specific exception. --- diff --git a/src/mc/mc_record.cpp b/src/mc/mc_record.cpp index 5018b250e7..4af7633d9f 100644 --- a/src/mc/mc_record.cpp +++ b/src/mc/mc_record.cpp @@ -77,7 +77,7 @@ RecordTrace parseRecordTrace(const char* data) RecordTrace res; XBT_INFO("path=%s", data); if (data == nullptr || data[0] == '\0') - throw std::runtime_error("Could not parse record path"); + throw std::invalid_argument("Could not parse record path"); const char* current = data; while (*current) { @@ -85,7 +85,7 @@ RecordTrace parseRecordTrace(const char* data) simgrid::mc::Transition item; int count = sscanf(current, "%d/%d", &item.pid, &item.argument); if(count != 2 && count != 1) - throw std::runtime_error("Could not parse record path"); + throw std::invalid_argument("Could not parse record path"); res.push_back(item); // Find next chunk: