some fixes

This commit is contained in:
Sorunome 2020-05-29 08:49:52 +02:00
parent 6e21cff0a7
commit 72fdb68e82
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
1 changed files with 6 additions and 1 deletions

View File

@ -66,6 +66,11 @@ enum HTTPType { GET, POST, PUT, DELETE }
enum LoginState { logged, loggedOut }
class GenericException implements Exception {
final dynamic content;
GenericException(this.content);
}
/// Represents a Matrix client to communicate with a
/// [Matrix](https://matrix.org) homeserver and is the entry point for this
/// SDK.
@ -1167,7 +1172,7 @@ class Client {
print(s);
onOlmError.add(
ToDeviceEventDecryptionError(
exception: e,
exception: (e is Exception) ? e : GenericException(e),
stackTrace: s,
toDeviceEvent: toDeviceEvent,
),