Author: gavincornwell
Date: Thu Jul 10 13:48:33 2014
New Revision: 1609458
URL: http://svn.apache.org/r1609458
Log:
Populate the localizedFailureReason property from the provided error.
Modified:
chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISErrors.m
Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISErrors.m
URL:
http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISErrors.m?rev=1609458&r1=1609457&r2=1609458&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISErrors.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISErrors.m Thu Jul 10
13:48:33 2014
@@ -74,6 +74,12 @@ NSString * const kCMISErrorDescriptionVe
NSMutableDictionary *errorInfo = [NSMutableDictionary dictionary];
[errorInfo setValue:[CMISErrors localizedDescriptionForCode:code]
forKey:NSLocalizedDescriptionKey];
[errorInfo setObject:error forKey:NSUnderlyingErrorKey];
+
+ if (error.localizedFailureReason != nil)
+ {
+ errorInfo[NSLocalizedFailureReasonErrorKey] =
error.localizedFailureReason;
+ }
+
return [NSError errorWithDomain:kCMISErrorDomainName code:code
userInfo:errorInfo];
}