Skip to content

Commit

Permalink
attrs_before: Add error for unknown type
Browse files Browse the repository at this point in the history
  • Loading branch information
mkleehammer committed Oct 13, 2023
1 parent 4435d14 commit d5a9359
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ static bool ApplyPreconnAttrs(HDBC hdbc, SQLINTEGER ikey, PyObject *value, char
}
return true;
}
else
{
RaiseErrorV(0, PyExc_TypeError, "Unsupported attrs_before type: %s",
Py_TYPE(value)->tp_name);
return false;
}

Py_BEGIN_ALLOW_THREADS
ret = SQLSetConnectAttrW(hdbc, ikey, ivalue, vallen);
Expand Down

0 comments on commit d5a9359

Please sign in to comment.