Skip to content

[BUG] Inconsistent error message formatting #502

Open
@brody4hire

Description

@brody4hire

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA software defect within SQLCipher for Android

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions