diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-09-04 17:55:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 17:55:41 (GMT) |
commit | 81715808716198471fbca0a3db42ac408468dbc5 (patch) | |
tree | 841863059ef0d12191c84d52caf967cacf0440d4 /Modules/_sqlite | |
parent | 4b8032e5a4994a7902076efa72fca1e2c85d8b7f (diff) | |
download | cpython-81715808716198471fbca0a3db42ac408468dbc5.zip cpython-81715808716198471fbca0a3db42ac408468dbc5.tar.gz cpython-81715808716198471fbca0a3db42ac408468dbc5.tar.bz2 |
bpo-41638: Improve ProgrammingError message for absent parameter. (GH-21999)
It contains now the name of the parameter instead of its index when parameters
are supplied as a dict.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/statement.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c index 9de8f9b..26599b4 100644 --- a/Modules/_sqlite/statement.c +++ b/Modules/_sqlite/statement.c @@ -295,7 +295,7 @@ void pysqlite_statement_bind_parameters(pysqlite_Statement* self, PyObject* para Py_DECREF(binding_name_obj); if (!current_param) { if (!PyErr_Occurred() || PyErr_ExceptionMatches(PyExc_LookupError)) { - PyErr_Format(pysqlite_ProgrammingError, "You did not supply a value for binding %d.", i); + PyErr_Format(pysqlite_ProgrammingError, "You did not supply a value for binding parameter :%s.", binding_name); } return; } |