`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
|
@ -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…
Reference in New Issue