Browse Source

OC-2841: Fix bug: Folder doesn't refresh and loading is in the action bar for more than 12 minutes

masensio 11 years ago
parent
commit
45b73934fa
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/com/owncloud/android/services/OperationsService.java

+ 8 - 1
src/com/owncloud/android/services/OperationsService.java

@@ -228,7 +228,14 @@ public class OperationsService extends Service {
                     Log_OC.e(TAG, "Error while trying to get autorization for " + mLastTarget.mAccount.name, e);
                     Log_OC.e(TAG, "Error while trying to get autorization for " + mLastTarget.mAccount.name, e);
                 }
                 }
                 result = new RemoteOperationResult(e);
                 result = new RemoteOperationResult(e);
-                
+            } catch (Exception e) {
+                if (mLastTarget.mAccount == null) {
+                    Log_OC.e(TAG, "Unexpected error for a NULL account", e);
+                } else {
+                    Log_OC.e(TAG, "Unexpected error for " + mLastTarget.mAccount.name, e);
+                }
+                result = new RemoteOperationResult(e);
+            
             } finally {
             } finally {
                 synchronized(mPendingOperations) {
                 synchronized(mPendingOperations) {
                     mPendingOperations.poll();
                     mPendingOperations.poll();