mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-15 02:18:33 +05:00
Merge branch 'build_with_older_pybind11' into 'master'
also allow building with older pybind11 without py::set_error See merge request ngsolve/netgen!681
This commit is contained in:
commit
5b245d4de3
@ -86,7 +86,11 @@ DLL_HEADER void ExportNgOCC(py::module &m)
|
||||
try {
|
||||
if(p) std::rethrow_exception(p);
|
||||
} catch (const Standard_Failure& e) {
|
||||
#if (PYBIND11_VERSION_MAJOR == 2 && PYBIND11_VERSION_MINOR < 12)
|
||||
exc((string(e.DynamicType()->Name()) + ": " + e.GetMessageString()).c_str());
|
||||
#else
|
||||
py::set_error(PyExc_RuntimeError, (string(e.DynamicType()->Name()) + ": " + e.GetMessageString()).c_str());
|
||||
#endif
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user