aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt6
2 files changed, 10 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt
index 00d04a3e..9f26f3f7 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt
@@ -129,7 +129,11 @@ abstract class FrostParserFragment<T : Any, Item : IItem<*, *>> : RecyclerFragme
val cookie = FbCookie.webCookie
val doc = getDoc(cookie)
progress(60)
- val response = parser.parse(cookie, doc)
+ val response = try {
+ parser.parse(cookie, doc)
+ } catch (ignored: Exception) {
+ null
+ }
if (response == null) {
L.i { "RecyclerFragment failed for ${baseEnum.name}" }
L._d { "Cookie used: $cookie" }
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
index d036d3a8..f66f77e2 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
@@ -117,7 +117,11 @@ enum class NotificationType(
* or -1 if an error occurred
*/
fun fetch(context: Context, data: CookieModel): Int {
- val response = parser.parse(data.cookie)
+ val response = try {
+ parser.parse(data.cookie)
+ } catch (ignored: Exception) {
+ null
+ }
if (response == null) {
L.v { "$name notification data not found" }
return -1