Skip to content

Commit

Permalink
requested error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
gagelarsen committed Sep 27, 2018
1 parent da46adc commit f295234
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xmscore/python/misc/PyUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ boost::shared_ptr<VecPt3d> VecPt3dFromPyIter(const py::iterable& pts)
boost::shared_ptr<xms::VecPt3d> vec_pts(new xms::VecPt3d());
for (auto item : pts) {
if(!py::isinstance<py::iterable>(item)) {
throw py::type_error("First arg must be a n-tuple of 0, 1, 2, or 3-tuples");
throw py::type_error("First arg must be an iterable object");
}
py::tuple tuple = item.cast<py::iterable>();
Pt3d point;
Expand Down Expand Up @@ -134,7 +134,7 @@ boost::shared_ptr<VecPt2d> VecPt2dFromPyIter(const py::iterable& pts)
boost::shared_ptr<xms::VecPt2d> vec_pts(new xms::VecPt2d());
for (auto item : pts) {
if(!py::isinstance<py::iterable>(item)) {
throw py::type_error("First arg must be a n-tuple of 0, 1, or 2-tuples");
throw py::type_error("First arg must be an iterable object");
}
py::tuple tuple = item.cast<py::iterable>();
Pt2d point;
Expand Down

0 comments on commit f295234

Please sign in to comment.