Skip to content

Replace all exception to android.database.sqlite package #556

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Expand Up @@ -239,7 +239,7 @@ namespace sqlcipher {
const char *text = (const char*)sqlite3_column_text(statement, 0);
if (strcmp(text, "ok") != 0) {
LOGE("integrity check failed for \"%s\": %s\n", integritySql, path8, text);
jniThrowException(env, "net/sqlcipher/database/SQLiteDatabaseCorruptException", text);
jniThrowException(env, "android/database/sqlite/SQLiteDatabaseCorruptException", text);
goto done;
}
}
Expand Down Expand Up @@ -631,28 +631,28 @@ namespace sqlcipher {
const char* exceptionClass;
switch (errcode) {
case SQLITE_IOERR:
exceptionClass = "net/sqlcipher/database/SQLiteDiskIOException";
exceptionClass = "android/database/sqlite/SQLiteDiskIOException";
break;
case SQLITE_CORRUPT:
exceptionClass = "net/sqlcipher/database/SQLiteDatabaseCorruptException";
exceptionClass = "android/database/sqlite/SQLiteDatabaseCorruptException";
break;
case SQLITE_CONSTRAINT:
exceptionClass = "net/sqlcipher/database/SQLiteConstraintException";
exceptionClass = "android/database/sqlite/SQLiteConstraintException";
break;
case SQLITE_ABORT:
exceptionClass = "net/sqlcipher/database/SQLiteAbortException";
exceptionClass = "android/database/sqlite/SQLiteAbortException";
break;
case SQLITE_DONE:
exceptionClass = "net/sqlcipher/database/SQLiteDoneException";
exceptionClass = "android/database/sqlite/SQLiteDoneException";
break;
case SQLITE_FULL:
exceptionClass = "net/sqlcipher/database/SQLiteFullException";
exceptionClass = "android/database/sqlite/SQLiteFullException";
break;
case SQLITE_MISUSE:
exceptionClass = "net/sqlcipher/database/SQLiteMisuseException";
exceptionClass = "android/database/sqlite/SQLiteMisuseException";
break;
default:
exceptionClass = "net/sqlcipher/database/SQLiteException";
exceptionClass = "android/database/sqlite/SQLiteException";
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@

package net.sqlcipher;

import net.sqlcipher.database.SQLiteAbortException;
import net.sqlcipher.database.SQLiteConstraintException;
import android.database.SQLException;
import android.database.sqlite.SQLiteAbortException;
import android.database.sqlite.SQLiteConstraintException;
import net.sqlcipher.database.SQLiteDatabase;
import net.sqlcipher.database.SQLiteDatabaseCorruptException;
import net.sqlcipher.database.SQLiteDiskIOException;
import net.sqlcipher.database.SQLiteException;
import net.sqlcipher.database.SQLiteFullException;
import android.database.sqlite.SQLiteDatabaseCorruptException;
import android.database.sqlite.SQLiteDiskIOException;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteFullException;
import net.sqlcipher.database.SQLiteProgram;
import net.sqlcipher.database.SQLiteStatement;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.List;

import net.sqlcipher.database.SQLiteDatabase;
import net.sqlcipher.database.SQLiteException;
import android.database.sqlite.SQLiteException;

import android.util.Log;
import android.util.Pair;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import net.sqlcipher.AbstractWindowedCursor;
import net.sqlcipher.BuildConfig;
import net.sqlcipher.CursorWindow;
import net.sqlcipher.SQLException;
import android.database.SQLException;

import java.lang.ref.WeakReference;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import net.sqlcipher.DatabaseUtils;
import net.sqlcipher.DatabaseErrorHandler;
import net.sqlcipher.DefaultDatabaseErrorHandler;
import net.sqlcipher.SQLException;
import android.database.SQLException;
import net.sqlcipher.database.SQLiteDebug.DbStats;
import net.sqlcipher.database.SQLiteDatabaseHook;
import net.sqlcipher.database.SQLiteQueryStats;
Expand Down Expand Up @@ -54,6 +54,8 @@

import android.content.Context;

import android.database.sqlite.SQLiteDatabaseCorruptException;
import android.database.sqlite.SQLiteException;
import android.os.CancellationSignal;
import android.os.Debug;
import android.os.SystemClock;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import net.sqlcipher.DefaultDatabaseErrorHandler;
import net.sqlcipher.database.SQLiteDatabaseHook;
import net.sqlcipher.database.SQLiteDatabase.CursorFactory;

import android.database.sqlite.SQLiteException;
import android.util.Log;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package net.sqlcipher.database;
import net.sqlcipher.*;

import android.database.sqlite.SQLiteDatabaseCorruptException;
import android.database.sqlite.SQLiteMisuseException;
import android.os.SystemClock;
import android.util.Log;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import net.sqlcipher.*;

import android.database.sqlite.SQLiteException;
import android.net.Uri;
import android.util.Log;
import android.widget.Toast;
Expand Down
Loading