Exception -> Throwable
This commit is contained in:
parent
550908fa70
commit
095216349e
|
@ -47,8 +47,8 @@ class DefaultItemFactory @Inject constructor(private val avatarSizeProvider: Ava
|
||||||
fun create(event: TimelineEvent,
|
fun create(event: TimelineEvent,
|
||||||
highlight: Boolean,
|
highlight: Boolean,
|
||||||
callback: TimelineEventController.Callback?,
|
callback: TimelineEventController.Callback?,
|
||||||
exception: Exception? = null): DefaultItem {
|
throwable: Throwable? = null): DefaultItem {
|
||||||
val text = if (exception == null) {
|
val text = if (throwable == null) {
|
||||||
"${event.root.getClearType()} events are not yet handled"
|
"${event.root.getClearType()} events are not yet handled"
|
||||||
} else {
|
} else {
|
||||||
"an exception occurred when rendering the event ${event.root.eventId}"
|
"an exception occurred when rendering the event ${event.root.eventId}"
|
||||||
|
|
|
@ -76,9 +76,9 @@ class TimelineItemFactory @Inject constructor(
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (throwable: Throwable) {
|
||||||
Timber.e(e, "failed to create message item")
|
Timber.e(throwable, "failed to create message item")
|
||||||
defaultItemFactory.create(event, highlight, callback, e)
|
defaultItemFactory.create(event, highlight, callback, throwable)
|
||||||
}
|
}
|
||||||
return (computedModel ?: EmptyItem_())
|
return (computedModel ?: EmptyItem_())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue