From aa12cbcac2d9f380847644febdf1f13f102cebb1 Mon Sep 17 00:00:00 2001 From: manuroe Date: Thu, 24 Nov 2016 11:45:59 +0100 Subject: OLMKit: Make returned NSError provide the raw olm error string (ex:"UNKNOWN_MESSAGE_INDEX") in their NSLocalizedDescriptionKey. NSLocalizedFailureReasonErrorKey can contain more contextual information. --- xcode/OLMKit/OLMOutboundGroupSession.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xcode/OLMKit/OLMOutboundGroupSession.m') 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] }]; } -- cgit v1.2.3