aboutsummaryrefslogtreecommitdiff
path: root/xcode/OLMKit/OLMInboundGroupSession.m
diff options
context:
space:
mode:
authormanuroe <manu@matrix.org>2016-11-24 11:45:59 +0100
committermanuroe <manu@matrix.org>2016-11-24 11:45:59 +0100
commitaa12cbcac2d9f380847644febdf1f13f102cebb1 (patch)
tree886518258a27c6eaed5df4bfd0b0f5a7958739ee /xcode/OLMKit/OLMInboundGroupSession.m
parent93926e90477355c671b50704711a58889832b077 (diff)
OLMKit: Make returned NSError provide the raw olm error string (ex:"UNKNOWN_MESSAGE_INDEX") in their NSLocalizedDescriptionKey.
NSLocalizedFailureReasonErrorKey can contain more contextual information.
Diffstat (limited to 'xcode/OLMKit/OLMInboundGroupSession.m')
-rw-r--r--xcode/OLMKit/OLMInboundGroupSession.m9
1 files changed, 6 insertions, 3 deletions
diff --git a/xcode/OLMKit/OLMInboundGroupSession.m b/xcode/OLMKit/OLMInboundGroupSession.m
index eec2ffa..4f7bdd7 100644
--- a/xcode/OLMKit/OLMInboundGroupSession.m
+++ b/xcode/OLMKit/OLMInboundGroupSession.m
@@ -65,7 +65,8 @@
*error = [NSError errorWithDomain:OLMErrorDomain
code:0
userInfo:@{
- NSLocalizedDescriptionKey: [NSString stringWithFormat:@"olm_init_inbound_group_session error: %@", errorString]
+ NSLocalizedDescriptionKey: errorString,
+ NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"olm_init_inbound_group_session error: %@", errorString]
}];
}
@@ -110,7 +111,8 @@
*error = [NSError errorWithDomain:OLMErrorDomain
code:0
userInfo:@{
- NSLocalizedDescriptionKey: [NSString stringWithFormat:@"olm_group_decrypt_max_plaintext_length error: %@", errorString]
+ NSLocalizedDescriptionKey: errorString,
+ NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"olm_group_decrypt_max_plaintext_length error: %@", errorString]
}];
}
@@ -132,7 +134,8 @@
*error = [NSError errorWithDomain:OLMErrorDomain
code:0
userInfo:@{
- NSLocalizedDescriptionKey: [NSString stringWithFormat:@"olm_group_decrypt error: %@", errorString]
+ NSLocalizedDescriptionKey: errorString,
+ NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"olm_group_decrypt error: %@", errorString]
}];
}