mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Detekt: enable rule exceptions.SwallowedException and fix existing issue.
This commit is contained in:
+1
-1
@@ -112,7 +112,7 @@ fun EventDebugInfoView(
|
||||
private fun prettyJSON(maybeJSON: String): String {
|
||||
return try {
|
||||
JSONObject(maybeJSON).toString(2)
|
||||
} catch (e: JSONException) {
|
||||
} catch (_: JSONException) {
|
||||
// Prefer not pretty-printing over crashing if the data is not actually JSON
|
||||
maybeJSON
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user