Merge branch 'share_link__new_share' into release-1.5.4
[pub/Android/ownCloud.git] / src / com / owncloud / android / services / OperationsService.java
index 316657c..80149f6 100644 (file)
@@ -228,7 +228,14 @@ public class OperationsService extends Service {
                     Log_OC.e(TAG, "Error while trying to get autorization for " + mLastTarget.mAccount.name, 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 {
                 synchronized(mPendingOperations) {
                     mPendingOperations.poll();