mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
raise length_error not netgen::Exception on wrong tuple size
This commit is contained in:
parent
d72801d19a
commit
945bf2b3a3
@ -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]),
|
||||
|
Loading…
Reference in New Issue
Block a user