mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 20:29:10 +03:00
toModel
was not catching com.squareup.moshi.JsonDataException properly (discovered when joining a Jitsi conf added as a Widget)
This commit is contained in:
parent
33b7294bbf
commit
5d3228d97b
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ inline fun <reified T> Content?.toModel(catchError: Boolean = true): T? {
|
|||
val moshiAdapter = moshi.adapter(T::class.java)
|
||||
return try {
|
||||
moshiAdapter.fromJsonValue(this)
|
||||
} catch (e: Exception) {
|
||||
} catch (e: Throwable) {
|
||||
if (catchError) {
|
||||
Timber.e(e, "To model failed : $e")
|
||||
null
|
||||
|
|
Loading…
Add table
Reference in a new issue