Explorar o código

Add a silent exception for upload errors

Vishnu Mohandas %!s(int64=4) %!d(string=hai) anos
pai
achega
114511489d
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  1. 2 0
      lib/core/errors.dart
  2. 2 0
      lib/services/sync_service.dart

+ 2 - 0
lib/core/errors.dart

@@ -7,3 +7,5 @@ class SyncStopRequestedError extends Error {}
 class NoActiveSubscriptionError extends Error {}
 class NoActiveSubscriptionError extends Error {}
 
 
 class StorageLimitExceededError extends Error {}
 class StorageLimitExceededError extends Error {}
+
+class SilentlyCancelUploadsError extends Error {}

+ 2 - 0
lib/services/sync_service.dart

@@ -311,6 +311,8 @@ class SyncService {
       // Do nothing since it's caused mostly due to concurrency issues
       // Do nothing since it's caused mostly due to concurrency issues
       // when the foreground app deletes temporary files, interrupting a background
       // when the foreground app deletes temporary files, interrupting a background
       // upload
       // upload
+    } on SilentlyCancelUploadsError {
+      // Do nothing
     } catch (e) {
     } catch (e) {
       throw e;
       throw e;
     }
     }