This macro assumed that all errors were runtime errors.
return PyCredentialCacheContainer_from_ccache_container(ccc);
}
- PyErr_SetStringError(error_string);
+ PyErr_SetString(PyExc_RuntimeError, error_string);
talloc_free(event_ctx);
return NULL;
#define PyErr_FromString(str) Py_BuildValue("(s)", discard_const_p(char, str))
-#define PyErr_SetStringError(str) \
- PyErr_SetObject(PyExc_RuntimeError, PyErr_FromString(str))
-
#define PyErr_SetWERROR(err) \
PyErr_SetObject(PyExc_RuntimeError, PyErr_FromWERROR(err))
guid = samdb_ntds_invocation_id(ldb);
if (guid == NULL) {
- PyErr_SetStringError("Failed to find NTDS invocation ID");
+ PyErr_SetString(PyExc_RuntimeError, "Failed to find NTDS invocation ID");
talloc_free(mem_ctx);
return NULL;
}
guid = samdb_ntds_objectGUID(ldb);
if (guid == NULL) {
- PyErr_SetStringError("Failed to find NTDS GUID");
+ PyErr_SetString(PyExc_RuntimeError, "Failed to find NTDS GUID");
talloc_free(mem_ctx);
return NULL;
}