Skip to content

Commit

Permalink
Address review: document get_exception_class() return value
Browse files Browse the repository at this point in the history
  • Loading branch information
Erlend E. Aasland committed Aug 25, 2021
1 parent b9a5a77 commit 3589a6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Modules/_sqlite/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pysqlite_step(sqlite3_stmt *statement)
return rc;
}

// Returns non-NULL if a new exception should be raised
static PyObject *
get_exception_class(pysqlite_state *state, int errorcode)
{
Expand Down Expand Up @@ -133,6 +134,7 @@ _pysqlite_seterror(pysqlite_state *state, sqlite3 *db)
int errorcode = sqlite3_errcode(db);
PyObject *exc_class = get_exception_class(state, errorcode);
if (exc_class == NULL) {
// No new exception need be raised; just pass the error code
return errorcode;
}

Expand Down

0 comments on commit 3589a6a

Please sign in to comment.