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

View file

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