Skip to content

Commit 8968aab

Browse files
committed
ErrorActivity: Catch exceptions not throwables
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
1 parent d7a4435 commit 8968aab

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/src/main/java/org/schabi/newpipe/error/ErrorActivity.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ class ErrorActivity : AppCompatActivity() {
198198
.value("user_comment", binding.errorCommentBox.getText().toString())
199199
.end()
200200
.done()
201-
} catch (error: Throwable) {
202-
Log.e(TAG, "Error while erroring: Could not build json", error)
201+
} catch (exception: Exception) {
202+
Log.e(TAG, "Error while erroring: Could not build json", exception)
203203
}
204204

205205
return ""
@@ -253,8 +253,8 @@ class ErrorActivity : AppCompatActivity() {
253253
}
254254
append("<hr>\n")
255255
}
256-
} catch (error: Throwable) {
257-
Log.e(TAG, "Error while erroring: Could not build markdown", error)
256+
} catch (exception: Exception) {
257+
Log.e(TAG, "Error while erroring: Could not build markdown", exception)
258258
return ""
259259
}
260260
}

0 commit comments

Comments
 (0)