Skip to content

Commit 3589a6a

Browse files
author
Erlend E. Aasland
committed
Address review: document get_exception_class() return value
1 parent b9a5a77 commit 3589a6a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Modules/_sqlite/util.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pysqlite_step(sqlite3_stmt *statement)
3636
return rc;
3737
}
3838

39+
// Returns non-NULL if a new exception should be raised
3940
static PyObject *
4041
get_exception_class(pysqlite_state *state, int errorcode)
4142
{
@@ -133,6 +134,7 @@ _pysqlite_seterror(pysqlite_state *state, sqlite3 *db)
133134
int errorcode = sqlite3_errcode(db);
134135
PyObject *exc_class = get_exception_class(state, errorcode);
135136
if (exc_class == NULL) {
137+
// No new exception need be raised; just pass the error code
136138
return errorcode;
137139
}
138140

0 commit comments

Comments
 (0)