help clear some pesky errors

This commit is contained in:
rebelonion 2024-01-21 00:30:54 -06:00
parent 8e93f66ba8
commit 734c5d0571

View file

@ -130,6 +130,13 @@ fun <T> loadData(fileName: String, context: Context? = null, toast: Boolean = tr
} }
} catch (e: Exception) { } catch (e: Exception) {
if (toast) snackString(a?.getString(R.string.error_loading_data, fileName)) if (toast) snackString(a?.getString(R.string.error_loading_data, fileName))
//try to delete the file
try {
a?.deleteFile(fileName)
} catch (e: Exception) {
FirebaseCrashlytics.getInstance().log("Failed to delete file $fileName")
FirebaseCrashlytics.getInstance().recordException(e)
}
e.printStackTrace() e.printStackTrace()
} }
return null return null