mirror of
https://github.com/NGSolve/netgen.git
synced 2026-06-16 00:20:34 +08:00
use std invalid argument instead of Exception in py constructor
This commit is contained in:
@@ -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]));
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user