fix pybind11 exception binding warning

This commit is contained in:
Christopher Lackner 2024-08-26 12:21:56 +02:00
parent d9247d094b
commit c7800704b0

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());
}
});