Fix crash on slash commands Exceptions

This commit is contained in:
Benoit Marty 2021-10-19 12:33:47 +02:00
parent fe2ba28441
commit 364654b685
2 changed files with 2 additions and 1 deletions

1
changelog.d/4261.bugfix Normal file
View File

@ -0,0 +1 @@
Fix crash on slash commands Exceptions

View File

@ -709,7 +709,7 @@ class TextComposerViewModel @AssistedInject constructor(
val event = try { val event = try {
block() block()
TextComposerViewEvents.SlashCommandResultOk TextComposerViewEvents.SlashCommandResultOk
} catch (failure: Exception) { } catch (failure: Throwable) {
TextComposerViewEvents.SlashCommandResultError(failure) TextComposerViewEvents.SlashCommandResultError(failure)
} }
_viewEvents.post(event) _viewEvents.post(event)