chore: Better error message when join room failed

This commit is contained in:
Krille 2024-11-19 12:15:13 +01:00
commit 5fc75ac307
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
3 changed files with 13 additions and 7 deletions

View file

@ -101,6 +101,11 @@ extension LocalizedExceptionExtension on Object {
}
if (this is String) return toString();
if (this is UiaException) return toString();
if (exceptionContext == ExceptionContext.joinRoom) {
return L10n.of(context).unableToJoinChat;
}
Logs().w('Something went wrong: ', this);
return L10n.of(context).oopsSomethingWentWrong;
}
@ -110,4 +115,5 @@ enum ExceptionContext {
changePassword,
checkHomeserver,
checkServerSupportInfo,
joinRoom,
}