Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / include / xbt / asserts.hpp
index d018d04..ab9de25 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2016-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -27,8 +27,8 @@
 #define _xbt_enforce_ARG1(cond) _xbt_enforce_ARGN((cond), "Assertion %s failed", #cond)
 #define _xbt_enforce_ARGN(cond, ...)                                                                                   \
   do {                                                                                                                 \
-    if (!(cond)) {                                                                                                     \
-      throw simgrid::AssertionError(__VA_ARGS__);                                                                 \
+    if (not(cond)) {                                                                                                   \
+      throw simgrid::AssertionError(XBT_THROW_POINT, xbt::string_printf(__VA_ARGS__));                                 \
     }                                                                                                                  \
   } while (0)