raise length_error not netgen::Exception on wrong tuple size

This commit is contained in:
Christopher Lackner 2024-08-26 11:14:29 +02:00
parent d72801d19a
commit 945bf2b3a3

View File

@ -25,7 +25,7 @@ DLL_HEADER void ExportNgOCCBasic(py::module &m)
.def(py::init([] (py::tuple pnt)
{
if (py::len(pnt) != 3)
throw Exception("need 3-tuple to create gp_Pnt");
throw std::length_error("need 3-tuple to create gp_Pnt");
return gp_Pnt(py::cast<double>(pnt[0]),
py::cast<double>(pnt[1]),