From 45acbbf6ef301b5f03ff729e40b297308f08b9e4 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Tue, 5 Nov 2024 07:55:23 +0100 Subject: [PATCH] use std invalid argument instead of Exception in py constructor --- libsrc/occ/python_occ_basic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/occ/python_occ_basic.cpp b/libsrc/occ/python_occ_basic.cpp index 52fc5b80..cff6131f 100644 --- a/libsrc/occ/python_occ_basic.cpp +++ b/libsrc/occ/python_occ_basic.cpp @@ -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(pnt[0]), py::cast(pnt[1])); }))