Log key read failure

This commit is contained in:
Kornel committed 2017-04-24 18:05:13 +01:00
1 parent 715163fe0d
commit 60727bffa5
1 file changed
+6 -1
+6 -1
View File
@@ -127,7 +127,12 @@
if (!keyPath) {
return nil;
}
return [NSString stringWithContentsOfFile:keyPath encoding:NSASCIIStringEncoding error:nil];
NSError *error = nil;
key = [NSString stringWithContentsOfFile:keyPath encoding:NSASCIIStringEncoding error:&error];
if (error) {
SULog(SULogLevelError, @"Error loading %@: %@", keyPath, error);
}
return key;
}
- (NSString * __nullable)publicDSAKeyFileKey