Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

replace C++ exit(1) statements with exception handling #329

Merged
merged 8 commits into from
Oct 20, 2023
Prev Previous commit
Next Next commit
rename type->input_type
anilbey committed Oct 20, 2023
commit 5cc3c5ecdacf9c03e020b903663c8d6ee175b8cb
4 changes: 2 additions & 2 deletions efel/cppcore/cppcore.cpp
Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ static void PyList_from_vectorstring(vector<string> input, PyObject* output) {
}

static PyObject*
_getfeature(PyObject* self, PyObject* args, const string &type) {
_getfeature(PyObject* self, PyObject* args, const string &input_type) {
char* feature_name;
PyObject* py_values;

@@ -128,7 +128,7 @@ _getfeature(PyObject* self, PyObject* args, const string &type) {
return NULL;
}

if (!type.empty() && feature_type != type){ // when types do not match
if (!input_type.empty() && feature_type != input_type){ // when types do not match
PyErr_SetString(PyExc_TypeError, "Feature type does not match");
return NULL;
}