From 6ab8a39fcc167e3f297f48c4c8e7d550851a5855 Mon Sep 17 00:00:00 2001 From: Kostyantyn Voskovskyi Date: Tue, 9 Sep 2025 12:47:10 +0300 Subject: [PATCH] EXP-15601: Updated error log to include NSError for S7IniConfig --- system7/Ini Parser/S7IniConfig.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/system7/Ini Parser/S7IniConfig.m b/system7/Ini Parser/S7IniConfig.m index 19c43f6..a6c6a22 100644 --- a/system7/Ini Parser/S7IniConfig.m +++ b/system7/Ini Parser/S7IniConfig.m @@ -40,7 +40,15 @@ + (instancetype)configWithContentsOfFile:(NSString *)filePath { encoding:NSUTF8StringEncoding error:&error]; if (nil == fileContents || error) { - logError("failed to load config at path '%s'. Failed to read string content.", filePath.fileSystemRepresentation); + NSString const* errorString = @"Failed to read string content"; + + if (error) { + errorString = [NSString stringWithFormat:@"Failed with error: %@", error]; + } + + logError("failed to load config at path '%s'. '%s'.", + filePath.fileSystemRepresentation, + [errorString UTF8String]); return nil; }