X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/4cb5119dfa978af3deecb83a56587ed08384193a..fdbf720097c9e51eef43f0c9811ab5899789349a:/main.cpp diff --git a/main.cpp b/main.cpp index 76125e9..c2b1d18 100644 --- a/main.cpp +++ b/main.cpp @@ -6,6 +6,12 @@ #include #include +// Don't look at this dirty hack... +// Delete it when THROWF comes in SG/svn. +#ifndef THROWF +#define THROWF(...) THROW1(__VA_ARGS__) +#endif + // Creates log categories XBT_LOG_NEW_CATEGORY(simu, "Root of simulation messages"); XBT_LOG_NEW_SUBCATEGORY(main, simu, "Messages from global infrastructure"); @@ -98,10 +104,10 @@ static int simulation_main(int argc, char* argv[]) delete proc; } catch (const std::invalid_argument& e) { - THROW1(arg_error, 0, "%s", e.what()); + THROWF(arg_error, 0, "%s", e.what()); } catch (const std::exception& e) { - THROW1(0, 0, "%s", e.what()); + THROWF(0, 0, "%s", e.what()); } return result; } @@ -255,7 +261,7 @@ int main(int argc, char* argv[]) delete proc_mutex; if (res != MSG_OK) - THROW1(0, 0, "MSG_main() failed with status %#x", res); + THROWF(0, 0, "MSG_main() failed with status %#x", res); exit_status = EXIT_NO_FAILURE; // ===== }