GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — bpo-16379: expose SQLite error codes and error names in `sqlite3` by erlend-aasland · Pull Request #27786 · python/cpython Conversation
|
|
cc. @nedbat |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
cc. @auvipy & @matrixise who reviewed the original PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
FYI, I pushed a small tweak to the unit test: use the Thanks for reviewing, @auvipy |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| int | ||
| _pysqlite_seterror(pysqlite_state *state, sqlite3 *db) | ||
| static PyObject * | ||
| get_exception_class(pysqlite_state *state, int errorcode) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is slighly confusing because normally returning NULL signifies an error. Could you please document this both on the call site and in this function? Otherwise the call site reads weirdly because
PyObject *exc_class = get_exception_class(state, errorcode);
if (exc_class == NULL) {
return errorcode;
}
seems that is handling an error
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yes, I see now that it can be a bit confusing. I'll add a comment. Thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Good work!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks Pablo, and you can thank @danielshahaf & @palaviv for the good work; I just "stole" it, rebased onto |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.