So I am programming an android application and I am getting unusual error. In the code below I am loading the data from an sql file into a sqlite database and updating a progress dialog while I do this. After successfully executing a number of statements I am getting an exception on one execSQL statement. This statement is a perfectly formed sql statement from what I can see. The wierd thing is the exception caught it null. It is not a NullPointerException but rather Exception e = null. I am guessing this is because execSQL calls native_execSQL but does anyone have any idea what this might be?
String line = null;
try {
final File dbsql = new File(dbSyncDumpFilename);
pd.setMax((int) dbsql.length());
open();
DBHelper.onUpgrade(db, 1, 1);
db.beginTransaction();
final BufferedReader file = new BufferedReader(new InputStreamReader(
new FileInputStream(dbsql)));
while ((line = file.readLine()) != null) {
pd.incrementProgressBy(line.length());
db.execSQL(line);
}
db.setTransactionSuccessful();
} catch (final Exception e) {
// e is null here
} finally {
db.endTransaction();
close();
}