Base: handle exceptions in ParameterGrpPy

This commit is contained in:
wmayer
2024-04-17 19:37:11 +02:00
committed by wwmayer
parent a713d5f96f
commit 83abfa49b8

View File

@@ -291,8 +291,14 @@ Py::Object ParameterGrpPy::importFrom(const Py::Tuple& args)
throw Py::Exception();
}
_cParamGrp->importFrom(pstr);
return Py::None();
try {
_cParamGrp->importFrom(pstr);
return Py::None();
}
catch (const Base::Exception& e) {
e.setPyException();
throw Py::Exception();
}
}
Py::Object ParameterGrpPy::insert(const Py::Tuple& args)
@@ -302,8 +308,14 @@ Py::Object ParameterGrpPy::insert(const Py::Tuple& args)
throw Py::Exception();
}
_cParamGrp->insert(pstr);
return Py::None();
try {
_cParamGrp->insert(pstr);
return Py::None();
}
catch (const Base::Exception& e) {
e.setPyException();
throw Py::Exception();
}
}
Py::Object ParameterGrpPy::exportTo(const Py::Tuple& args)
@@ -313,8 +325,14 @@ Py::Object ParameterGrpPy::exportTo(const Py::Tuple& args)
throw Py::Exception();
}
_cParamGrp->exportTo(pstr);
return Py::None();
try {
_cParamGrp->exportTo(pstr);
return Py::None();
}
catch (const Base::Exception& e) {
e.setPyException();
throw Py::Exception();
}
}
Py::Object ParameterGrpPy::getGroup(const Py::Tuple& args)