aboutsummaryrefslogtreecommitdiff
path: root/xcode/OLMKit/OLMAccount.m
diff options
context:
space:
mode:
authormanuroe <manu@matrix.org>2016-11-14 16:54:51 +0100
committermanuroe <manu@matrix.org>2016-11-14 16:54:51 +0100
commitcf66af6f2e7c69a3e0712317f8473ab09711d426 (patch)
tree425ad41ff31014973628daa8054772939e53edcd /xcode/OLMKit/OLMAccount.m
parent27a8c28da4e5c62d8863ee3d30642109d713c4d6 (diff)
OLMKit: Replaced NSAsserts by NSErrors
Diffstat (limited to 'xcode/OLMKit/OLMAccount.m')
-rw-r--r--xcode/OLMKit/OLMAccount.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/xcode/OLMKit/OLMAccount.m b/xcode/OLMKit/OLMAccount.m
index 085b487..4830995 100644
--- a/xcode/OLMKit/OLMAccount.m
+++ b/xcode/OLMKit/OLMAccount.m
@@ -151,7 +151,7 @@
size_t result = olm_remove_one_time_keys(self.account, session.session);
if (result == olm_error()) {
const char *error = olm_account_last_error(_account);
- NSAssert(NO, @"olm_remove_one_time_keys error: %s", error);
+ NSLog(@"olm_remove_one_time_keys error: %s", error);
return NO;
}
return YES;
@@ -174,7 +174,7 @@
NSParameterAssert(serializedData.length > 0);
if (key.length == 0 || serializedData.length == 0) {
if (error) {
- *error = [NSError errorWithDomain:@"org.matrix.olm" code:0 userInfo:@{NSLocalizedDescriptionKey: @"Bad length."}];
+ *error = [NSError errorWithDomain:OLMErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey: @"Bad length."}];
}
return nil;
}
@@ -184,7 +184,7 @@
const char *olm_error = olm_account_last_error(_account);
NSString *errorString = [NSString stringWithUTF8String:olm_error];
if (error && errorString) {
- *error = [NSError errorWithDomain:@"org.matrix.olm" code:0 userInfo:@{NSLocalizedDescriptionKey: errorString}];
+ *error = [NSError errorWithDomain:OLMErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey: errorString}];
}
return nil;
}
@@ -201,7 +201,7 @@
const char *olm_error = olm_account_last_error(_account);
NSString *errorString = [NSString stringWithUTF8String:olm_error];
if (error && errorString) {
- *error = [NSError errorWithDomain:@"org.matrix.olm" code:0 userInfo:@{NSLocalizedDescriptionKey: errorString}];
+ *error = [NSError errorWithDomain:OLMErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey: errorString}];
}
return nil;
}