mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
use std invalid argument instead of Exception in py constructor
This commit is contained in:
parent
9a7a9fa445
commit
45acbbf6ef
@ -170,7 +170,7 @@ DLL_HEADER void ExportNgOCCBasic(py::module &m)
|
||||
.def(py::init([] (py::tuple pnt)
|
||||
{
|
||||
if (py::len(pnt) != 2)
|
||||
throw Exception("need 2-tuple to create gp_Pnt2d");
|
||||
throw std::invalid_argument("need 2-tuple to create gp_Pnt2d");
|
||||
return gp_Pnt2d(py::cast<double>(pnt[0]),
|
||||
py::cast<double>(pnt[1]));
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user