Merge branch 'fix_pybind11_warning' into 'master'

fix pybind11 exception binding warning

See merge request ngsolve/netgen!661
This commit is contained in:
Schöberl, Joachim 2024-08-26 12:34:19 +02:00
commit 5103dac8d4

View File

@ -86,7 +86,7 @@ DLL_HEADER void ExportNgOCC(py::module &m)
try {
if(p) std::rethrow_exception(p);
} catch (const Standard_Failure& e) {
exc((string(e.DynamicType()->Name()) + ": " + e.GetMessageString()).c_str());
py::set_error(PyExc_RuntimeError, (string(e.DynamicType()->Name()) + ": " + e.GetMessageString()).c_str());
}
});