Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tesh: actually pick the path to python3 that we have
[simgrid.git] / src / xbt / ex.cpp
index 2ba0698..d2061eb 100644 (file)
@@ -48,6 +48,7 @@
 #include <xbt/backtrace.hpp>
 #include "src/internal_config.h"           /* execinfo when available */
 #include "xbt/ex.h"
+#include <xbt/ex.hpp>
 #include "xbt/log.h"
 #include "xbt/log.hpp"
 #include "xbt/backtrace.h"
@@ -87,17 +88,14 @@ void xbt_backtrace_display(xbt_backtrace_location_t* loc, std::size_t count)
 #endif
 }
 
-void xbt_throw(
+void _xbt_throw(
   char* message, xbt_errcat_t errcat, int value, 
   const char* file, int line, const char* func)
 {
-  xbt_ex e(message);
+  xbt_ex e(simgrid::xbt::ThrowPoint(file, line, func), message);
   free(message);
   e.category = errcat;
   e.value = value;
-  e.file = file;
-  e.line = line;
-  e.func = func;
   throw e;
 }
 
@@ -146,6 +144,7 @@ const char *xbt_ex_catname(xbt_errcat_t cat)
 #ifdef SIMGRID_TEST
 #include <stdio.h>
 #include "xbt/ex.h"
+#include <xbt/ex.hpp>
 
 XBT_TEST_SUITE("xbt_ex", "Exception Handling");