Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Inconsistent error message formatting #502

Open
brodycj opened this issue Mar 25, 2020 · 4 comments
Open

[BUG] Inconsistent error message formatting #502

brodycj opened this issue Mar 25, 2020 · 4 comments
Labels
bug A software defect within SQLCipher for Android

Comments

@brodycj
Copy link
Contributor

brodycj commented Mar 25, 2020

Expected Behavior

Error messages should show consistent formatting.

Here is an example of a consistently formatted error message from SQLCipher for Android: constraint failure: error code 19: UNIQUE constraint failed: test_table.data

Actual Behavior

I discovered several cases of inconsistent error message formatting. Here is an example: table test_table has no column named wrong_column: , while compiling: INSERT INTO test_table

I think it would be ideal if SQLCipher would show the actual error code in cases like this.

Steps to Reproduce

For the example above, execute the following statements on an open database:

DROP TABLE IF EXISTS test_table
CREATE TABLE IF NOT EXISTS test_table (data)

then try the following statement:

INSERT INTO test_table (wrong_column) VALUES (123)

SQLCipher library information

SQLCipher version (can be identified by executing PRAGMA cipher_version;):

4.3.0

SQLCipher for Android version:

4.3.0

Some more comments

It would be an ideal enhancement to show the error code in all cases.

I completely understand that this could be considered a cosmetic error styling issue.

I would love to get this fixed someday, unfortunately do not have much time to develop and test a solution due to an urgent work project.

@stale
Copy link

stale bot commented Apr 8, 2020

Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions.

@stale stale bot added the stale This issue lacks recent activity. label Apr 8, 2020
@brodycj brodycj changed the title Inconsistent error message formatting [BUG] Inconsistent error message formatting Apr 8, 2020
@stale stale bot removed the stale This issue lacks recent activity. label Apr 8, 2020
@brodycj
Copy link
Contributor Author

brodycj commented Apr 8, 2020

I think this is a bug, wish I had more time to contribute a solution with some test cases.

@sjlombardo sjlombardo added the bug A software defect within SQLCipher for Android label Apr 8, 2020
@sjlombardo
Copy link
Member

Thanks @brodybits we'll leave this open and look into it further when we have time.

@brodycj
Copy link
Contributor Author

brodycj commented Jun 3, 2020

I think this issue was already reproduced by tests added in sqlcipher/sqlcipher-android-tests#16 and is the same as closed issue #296. While not a major issue, I would love it if we could get it cleaned up someday. I wish I had more time to contribute bug fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A software defect within SQLCipher for Android
Projects
None yet
Development

No branches or pull requests

2 participants