@@ -75,8 +75,7 @@ public void run() {
7575 new Object []{"one for the money" , "two for the show" });
7676 }
7777 } catch (SQLiteException ex ) { Log .e (TAG , "caught exception, bailing" , ex ); }
78- // FIX: ADD CATCH #1:
79- // catch (IllegalStateException ex) { Log.e(TAG, "caught exception, bailing", ex); }
78+ catch (IllegalStateException ex ) { Log .e (TAG , "caught exception, bailing" , ex ); }
8079
8180 closeDatabase (writer , accessType );
8281 Log .i (TAG , String .format ("writer thread %d terminating" , id ));
@@ -116,8 +115,7 @@ synchronized void logRecordsBetween(SQLiteDatabase reader, int start, int end) {
116115 results = reader .rawQuery ("select rowid, * from t1 where rowid between ? and ?" ,
117116 new String []{String .valueOf (start ), String .valueOf (end )});
118117 } catch (IllegalStateException ex ) { Log .e (TAG , "caught exception, bailing" , ex ); }
119- // FIX: ADD CATCH #2:
120- // catch (SQLiteException ex) { Log.e(TAG, "caught exception, bailing", ex); }
118+ catch (SQLiteException ex ) { Log .e (TAG , "caught exception, bailing" , ex ); }
121119
122120 if (results != null ) {
123121 Log .i (TAG , String .format ("reader thread %d - writing results %d to %d" , id , start , end ));
@@ -139,8 +137,7 @@ synchronized int getCurrentTableCount(SQLiteDatabase database) {
139137 try {
140138 cursor = database .rawQuery ("select count(*) from t1;" , new String []{});
141139 } catch (IllegalStateException ex ) { Log .e (TAG , "caught exception, bailing with count = " + count , ex ); return 0 ; }
142- // FIX: ADD CATCH #3:
143- // catch (SQLiteException ex) { Log.e(TAG, "caught exception, bailing", ex); return 0; }
140+ catch (SQLiteException ex ) { Log .e (TAG , "caught exception, bailing" , ex ); return 0 ; }
144141
145142 // II. Attempt to get the count from the cursor:
146143 if (cursor != null ) {
0 commit comments