lets show some error messages during file fetching

This commit is contained in:
tibbi 2019-08-11 15:50:28 +02:00
parent c93705ebef
commit 4595f6549a

View file

@ -60,6 +60,7 @@ class MediaFetcher(val context: Context) {
val includedPaths = config.includedFolders val includedPaths = config.includedFolders
folders.filter { it.shouldFolderBeVisible(excludedPaths, includedPaths, shouldShowHidden) }.toMutableList() as ArrayList<String> folders.filter { it.shouldFolderBeVisible(excludedPaths, includedPaths, shouldShowHidden) }.toMutableList() as ArrayList<String>
} catch (e: Exception) { } catch (e: Exception) {
context.showErrorToast(e)
ArrayList() ArrayList()
} }
} }
@ -78,6 +79,8 @@ class MediaFetcher(val context: Context) {
parents.add(path.getParentPath()) parents.add(path.getParentPath())
} while (cursor.moveToNext()) } while (cursor.moveToNext())
} }
} catch (e: Exception) {
context.showErrorToast(e)
} finally { } finally {
cursor?.close() cursor?.close()
} }