aboutsummaryrefslogtreecommitdiff
path: root/xcode/OLMKit/OLMOutboundGroupSession.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/OLMOutboundGroupSession.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/OLMOutboundGroupSession.m')
-rw-r--r--xcode/OLMKit/OLMOutboundGroupSession.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/xcode/OLMKit/OLMOutboundGroupSession.m b/xcode/OLMKit/OLMOutboundGroupSession.m
index 0046173..d838ebc 100644
--- a/xcode/OLMKit/OLMOutboundGroupSession.m
+++ b/xcode/OLMKit/OLMOutboundGroupSession.m
@@ -118,7 +118,8 @@
*error = [NSError errorWithDomain:OLMErrorDomain
code:0
userInfo:@{
- NSLocalizedDescriptionKey: [NSString stringWithFormat:@"olm_group_encrypt error: %@", errorString]
+ NSLocalizedDescriptionKey: errorString,
+ NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"olm_group_encrypt error: %@", errorString]
}];
}