Browse Source

logging via LOG_OC
removed unnedded try catch

tobiaskaminsky 8 years ago
parent
commit
977e2fb691

+ 1 - 1
src/main/java/com/owncloud/android/ui/fragment/contactsbackup/ContactListFragment.java

@@ -472,7 +472,7 @@ public class ContactListFragment extends FileFragment {
                 try {
                     contactListAdapter.replaceVCards(Ezvcard.parse(file).all());
                 } catch (IOException e) {
-                    e.printStackTrace();
+                    Log_OC.e(TAG, "IO Exception: " + file.getAbsolutePath());
                 }
             }
         }

+ 4 - 10
src/main/java/com/owncloud/android/ui/fragment/contactsbackup/ContactsBackupFragment.java

@@ -185,17 +185,11 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
                 FileDataStorageManager storageManager = new FileDataStorageManager(account,
                         getActivity().getContentResolver());
 
-                RemoteOperationResult result = new RemoteOperationResult(RemoteOperationResult.ResultCode.UNKNOWN_ERROR);
-                try {
-                    OCFile folder = storageManager.getFileByPath(path[0]);
-                    RefreshFolderOperation operation = new RefreshFolderOperation(folder, System.currentTimeMillis(),
-                            false, false, false, storageManager, account, getContext());
-
-                    result = operation.execute(account, getContext());
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
+                OCFile folder = storageManager.getFileByPath(path[0]);
+                RefreshFolderOperation operation = new RefreshFolderOperation(folder, System.currentTimeMillis(),
+                        false, false, false, storageManager, account, getContext());
 
+                RemoteOperationResult result = operation.execute(account, getContext());
                 return result.isSuccess();
             }