File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
core/src/main/java/io/snabble/sdk Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,13 @@ void applyDeltaUpdate(InputStream inputStream) throws IOException {
324324 //occurrences in database rows
325325 scanner .useDelimiter (";\n \n " );
326326
327- tempDb .beginTransaction ();
327+ try {
328+ tempDb .beginTransaction ();
329+ } catch (SQLiteException e ){
330+ Logger .e ("Could not apply delta update: Could not access temp database" );
331+ return ;
332+ }
333+
328334 while (scanner .hasNext ()) {
329335 try {
330336 String line = scanner .next ();
@@ -353,8 +359,13 @@ void applyDeltaUpdate(InputStream inputStream) throws IOException {
353359 }
354360 }
355361
356- tempDb .setTransactionSuccessful ();
357- tempDb .endTransaction ();
362+ try {
363+ tempDb .setTransactionSuccessful ();
364+ tempDb .endTransaction ();
365+ } catch (SQLiteException e ){
366+ Logger .e ("Could not apply delta update: Could not finish transaction on temp database" );
367+ return ;
368+ }
358369
359370 //delta updates are making the database grow larger and larger, so we vacuum here
360371 //to keep the database as small as possible
You can’t perform that action at this time.
0 commit comments