X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d32cddf4087e9fe3fd8007773f4b247f21c8bef7..c8f375f14b9e04a4dd1767cb70c70b6dfc173f9c:/src/bindings/python/simgrid_python.cpp diff --git a/src/bindings/python/simgrid_python.cpp b/src/bindings/python/simgrid_python.cpp index de65d4a83d..533d61f465 100644 --- a/src/bindings/python/simgrid_python.cpp +++ b/src/bindings/python/simgrid_python.cpp @@ -100,7 +100,7 @@ PYBIND11_MODULE(simgrid, m) simgrid::s4u::this_actor::on_exit([act, fun](bool /*failed*/) { try { fun(); - } catch (py::error_already_set& e) { + } catch (const py::error_already_set& e) { xbt_die("Error while executing the on_exit lambda: %s", e.what()); } }); @@ -141,7 +141,7 @@ PYBIND11_MODULE(simgrid, m) /* If I was passed a class, I just built an instance, so I need to call it now */ if (py::isinstance(res)) res(); - } catch (py::error_already_set& ex) { + } catch (const py::error_already_set& ex) { if (ex.matches(pyForcefulKillEx)) { XBT_VERB("Actor killed"); /* Stop here that ForcefulKill exception which was meant to free the RAII stuff on the stack */ @@ -238,7 +238,7 @@ PYBIND11_MODULE(simgrid, m) return simgrid::s4u::Actor::create(name, host.cast(), [fun, args]() { try { fun(*args); - } catch (py::error_already_set& ex) { + } catch (const py::error_already_set& ex) { if (ex.matches(pyForcefulKillEx)) { XBT_VERB("Actor killed"); /* Stop here that ForcefulKill exception which was meant to free the RAII stuff on the stack */