recreateLocked(); } catch (MigrationFailedException fail) { onError(fail.getMessage(), fail); isInMigrationFailedHook = true; try {
recreateLocked(); } catch (MigrationFailedException fail) { onError(fail.getMessage(), fail); isInMigrationFailedHook = true; try {
/** * Called to downgrade the database to an older version */ public void onDowngrade(ISQLiteDatabase db, int oldVersion, int newVersion) { setDatabase(db); boolean success = false; Exception thrown = null; isInMigration = true; try { success = SquidDatabase.this.onDowngrade(db, oldVersion, newVersion); } catch (Exception e) { thrown = e; success = false; } finally { isInMigration = false; } if (thrown instanceof RecreateDuringMigrationException) { throw (RecreateDuringMigrationException) thrown; } else if (thrown instanceof MigrationFailedException) { throw (MigrationFailedException) thrown; } else if (!success) { throw new MigrationFailedException(getName(), oldVersion, newVersion, thrown); } }
/** * Called to upgrade the database to a new version */ public void onUpgrade(ISQLiteDatabase db, int oldVersion, int newVersion) { setDatabase(db); boolean success = false; Exception thrown = null; isInMigration = true; try { success = SquidDatabase.this.onUpgrade(db, oldVersion, newVersion); } catch (Exception e) { thrown = e; success = false; } finally { isInMigration = false; } if (thrown instanceof RecreateDuringMigrationException) { throw (RecreateDuringMigrationException) thrown; } else if (thrown instanceof MigrationFailedException) { throw (MigrationFailedException) thrown; } else if (!success) { throw new MigrationFailedException(getName(), oldVersion, newVersion, thrown); } }
/** * Called to downgrade the database to an older version */ public void onDowngrade(ISQLiteDatabase db, int oldVersion, int newVersion) { setDatabase(db); boolean success = false; Exception thrown = null; isInMigration = true; try { success = SquidDatabase.this.onDowngrade(db, oldVersion, newVersion); } catch (Exception e) { thrown = e; success = false; } finally { isInMigration = false; } if (thrown instanceof RecreateDuringMigrationException) { throw (RecreateDuringMigrationException) thrown; } else if (thrown instanceof MigrationFailedException) { throw (MigrationFailedException) thrown; } else if (!success) { throw new MigrationFailedException(getName(), oldVersion, newVersion, thrown); } }
/** * Called to upgrade the database to a new version */ public void onUpgrade(ISQLiteDatabase db, int oldVersion, int newVersion) { setDatabase(db); boolean success = false; Exception thrown = null; isInMigration = true; try { success = SquidDatabase.this.onUpgrade(db, oldVersion, newVersion); } catch (Exception e) { thrown = e; success = false; } finally { isInMigration = false; } if (thrown instanceof RecreateDuringMigrationException) { throw (RecreateDuringMigrationException) thrown; } else if (thrown instanceof MigrationFailedException) { throw (MigrationFailedException) thrown; } else if (!success) { throw new MigrationFailedException(getName(), oldVersion, newVersion, thrown); } }