From b15088f610a809c07f52f6329f74b2804c65e874 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 26 Aug 2018 01:31:24 +0200 Subject: [PATCH] convert a xbt_ex(arg_error) into a std::invalid_argument --- include/simgrid/smpi/replay.hpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/include/simgrid/smpi/replay.hpp b/include/simgrid/smpi/replay.hpp index 02caf33d6b..89a71773e4 100644 --- a/include/simgrid/smpi/replay.hpp +++ b/include/simgrid/smpi/replay.hpp @@ -14,22 +14,22 @@ #include #include -#define CHECK_ACTION_PARAMS(action, mandatory, optional) \ -{ \ - if (action.size() < static_cast(mandatory + 2)) { \ - std::stringstream ss; \ - for (const auto& elem : action) { \ - ss << elem << " "; \ - } \ - THROWF(arg_error, 0, "%s replay failed.\n" \ - "%zu items were given on the line. First two should be process_id and action. " \ - "This action needs after them %lu mandatory arguments, and accepts %lu optional ones. \n" \ - "The full line that was given is:\n %s\n" \ - "Please contact the Simgrid team if support is needed", \ - __func__, action.size(), static_cast(mandatory), static_cast(optional), \ - ss.str().c_str()); \ - } \ -} +#define CHECK_ACTION_PARAMS(action, mandatory, optional) \ + { \ + if (action.size() < static_cast(mandatory + 2)) { \ + std::stringstream ss; \ + ss << __func__ << " replay failed.\n" \ + << action.size() << " items were given on the line. First two should be process_id and action. " \ + << "This action needs after them " << mandatory << " mandatory arguments, and accepts " << optional \ + << " optional ones. \n" \ + << "The full line that was given is:\n "; \ + for (const auto& elem : action) { \ + ss << elem << " "; \ + } \ + ss << "\nPlease contact the Simgrid team if support is needed"; \ + throw std::invalid_argument(ss.str()); \ + } \ + } XBT_PRIVATE void* smpi_get_tmp_sendbuffer(int size); XBT_PRIVATE void* smpi_get_tmp_recvbuffer(int size); -- 2.20.1