diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/events/model/Event.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/events/model/Event.kt index 1f16041b54..6ae585a273 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/events/model/Event.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/events/model/Event.kt @@ -53,7 +53,7 @@ inline fun 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