mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Exception -> Throwable
This commit is contained in:
parent
550908fa70
commit
095216349e
2 changed files with 5 additions and 5 deletions
|
@ -47,8 +47,8 @@ class DefaultItemFactory @Inject constructor(private val avatarSizeProvider: Ava
|
|||
fun create(event: TimelineEvent,
|
||||
highlight: Boolean,
|
||||
callback: TimelineEventController.Callback?,
|
||||
exception: Exception? = null): DefaultItem {
|
||||
val text = if (exception == null) {
|
||||
throwable: Throwable? = null): DefaultItem {
|
||||
val text = if (throwable == null) {
|
||||
"${event.root.getClearType()} events are not yet handled"
|
||||
} else {
|
||||
"an exception occurred when rendering the event ${event.root.eventId}"
|
||||
|
|
|
@ -76,9 +76,9 @@ class TimelineItemFactory @Inject constructor(
|
|||
null
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Timber.e(e, "failed to create message item")
|
||||
defaultItemFactory.create(event, highlight, callback, e)
|
||||
} catch (throwable: Throwable) {
|
||||
Timber.e(throwable, "failed to create message item")
|
||||
defaultItemFactory.create(event, highlight, callback, throwable)
|
||||
}
|
||||
return (computedModel ?: EmptyItem_())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue