From b0ef2182bddf95d9b282412512dfe703a1df08b4 Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Sun, 23 Jun 2024 20:51:34 -0700 Subject: [PATCH] Passing error string through to NSError --- Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm b/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm index fb847e823c..5ce38d11b5 100644 --- a/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm +++ b/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm @@ -338,12 +338,15 @@ static la_ssize_t copy_data(struct archive *ar, struct archive *aw) NSString* msgString = [NSString stringWithSTString:msg]; dispatch_async(dispatch_get_main_queue(), ^{ + ST::string errorString = ST::string::from_wchar(NetErrorToString(result)); + NSString* errorNSString = [NSString stringWithSTString:errorString]; [parent.delegate patcherCompletedWithError:parent error:[NSError errorWithDomain:@"PLSPatchErrors" code:result userInfo:@{ - NSLocalizedFailureErrorKey : msgString + NSLocalizedFailureErrorKey : errorNSString, + NSLocalizedFailureReasonErrorKey: msgString }]]; }); }