Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the python patches
authorFabien Chaix <chaix@ics.forth.gr>
Tue, 1 Mar 2022 16:07:54 +0000 (18:07 +0200)
committerFabien Chaix <chaix@ics.forth.gr>
Tue, 1 Mar 2022 16:07:54 +0000 (18:07 +0200)
src/bindings/python/simgrid_python.cpp

index 9b684a5..83d2325 100644 (file)
@@ -218,11 +218,11 @@ PYBIND11_MODULE(simgrid, m)
                 if (py::isinstance<py::function>(res))
                   res();
               } catch (const py::error_already_set& ex) {
-                XBT_VERB("Actor killed");
                 if (ex.matches(PyExc_RuntimeError)) {
+                  XBT_VERB("Actor killed");
                   simgrid::ForcefulKillException::do_throw();
-                  throw;
                 }
+                throw;
               }
             });
           },
@@ -744,11 +744,11 @@ PYBIND11_MODULE(simgrid, m)
               try {
                 fun(*args);
               } catch (const py::error_already_set& ex) {
-                XBT_VERB("Actor killed");
                 if (ex.matches(PyExc_RuntimeError)) {
+                  XBT_VERB("Actor killed");
                   simgrid::ForcefulKillException::do_throw();
-                  throw;
                 }
+                throw;
               }
             });
           },