Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package net.zetetic.database.sqlcipher;

import android.database.sqlite.SQLiteException;

/**
* An exception that is specific to the "SQLITE_NOTADB" error code.
*
* <a href="https://www.sqlite.org/rescode.html#notadb">SQLITE_NOTADB</a>
*/
class SQLiteNotADatabaseException extends SQLiteException {
public SQLiteNotADatabaseException() {
super();
}

public SQLiteNotADatabaseException(String error) {
super(error);
}

public SQLiteNotADatabaseException(String error, Throwable cause) {
super(error, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void throw_sqlite3_exception(JNIEnv* env, int errcode,
/* Upstream treats treat "unsupported file format" error as corruption (SQLiteDatabaseCorruptException).
However, SQLITE_NOTADB can occur with mismatched keys, which is not a corruption case, so SQLCipher
treats this as a general exception */
exceptionClass = "android/database/sqlite/SQLiteException";
exceptionClass = "net/zetetic/database/sqlcipher/SQLiteNotADatabaseException";
break;
case SQLITE_CONSTRAINT:
exceptionClass = "android/database/sqlite/SQLiteConstraintException";
Expand Down