Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-69093: improve sqlite3.Connection.blobopen() error handling#91571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commentedApr 15, 2022
edited
Loading

Unless sqlite3_blob_open() returns SQLITE_MISUSE, the error code and
message are available on the connection object. This means we have to
handle SQLITE_MISUSE error messages explicitly.

gh-69093

Unless sqlite3_blob_open() returns SQLITE_MISUSE, the error code andmessage are available on the connection object. This means we have tohandle SQLITE_MISUSE error messages explicitly.
@erlend-aasland
Copy link
ContributorAuthor

I noticed this comment in thesqlite3_blob_open docs:

Unless it returns SQLITE_MISUSE, this function sets thedatabase connection error code and message accessible viasqlite3_errcode() andsqlite3_errmsg() and related functions.

_pysqlite_seterror uses the error code/message that is set on the connection object, so we need to handle theSQLITE_MISUSE case explicitly. Unfortunately (or luckily), there is no way for us to force such an error, so we cannot add a unit test for this.

@erlend-aasland
Copy link
ContributorAuthor

erlend-aasland commentedApr 15, 2022
edited
Loading

This reminds me that we need to mapSQLITE_MISUSE toInterfaceError iso.ProgrammingError. But that belongs to issue#89022.

UPDATE, seegh-91572.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@JelleZijlstraJelleZijlstraJelleZijlstra approved these changes

@berkerpeksagberkerpeksagAwaiting requested review from berkerpeksagberkerpeksag is a code owner

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@erlend-aasland@JelleZijlstra@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp