Skip to content

Commit

Permalink
Improve error message for invalid append to Ply/ObjWavefront containers
Browse files Browse the repository at this point in the history
  • Loading branch information
langmm committed Jul 8, 2024
1 parent 3ff6b5e commit 72b5c31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ static PyObject* ply_append(PyObject* self, PyObject* args, PyObject*) {
if (!PyArg_ParseTuple(args, "O:", &solf))
return NULL;
if (!PyObject_IsInstance(solf, (PyObject*)&Ply_Type)) {
PyErr_Format(PyExc_TypeError, "Can only append other Ply instances.");
PyErr_Format(PyExc_TypeError, "Can only append other Ply instances, not %S.", Py_TYPE(solf));
return NULL;
}

Expand Down Expand Up @@ -3180,7 +3180,7 @@ static PyObject* objwavefront_append(PyObject* self, PyObject* args, PyObject*)
if (!PyArg_ParseTuple(args, "O:", &solf))
return NULL;
if (!PyObject_IsInstance(solf, (PyObject*)&ObjWavefront_Type)) {
PyErr_Format(PyExc_TypeError, "Can only append other ObjWavefront instances.");
PyErr_Format(PyExc_TypeError, "Can only append other ObjWavefront instances, not %S.", Py_TYPE(solf));
return NULL;
}

Expand Down

0 comments on commit 72b5c31

Please sign in to comment.