From bb9c39fcb9bad923402d04b7f38396c1361ba8ae Mon Sep 17 00:00:00 2001 From: Guillaume Algis Date: Tue, 23 Aug 2016 19:57:33 +0200 Subject: [PATCH] Log when packages screenshots fail to download --- Alcatraz/Controllers/ATZPackageTableViewDelegate.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Alcatraz/Controllers/ATZPackageTableViewDelegate.m b/Alcatraz/Controllers/ATZPackageTableViewDelegate.m index e28fd9c..5d22522 100644 --- a/Alcatraz/Controllers/ATZPackageTableViewDelegate.m +++ b/Alcatraz/Controllers/ATZPackageTableViewDelegate.m @@ -189,12 +189,16 @@ - (void)fetchAndCacheImageForPackage:(ATZPackage*)package progress:(void(^)(CGFl [downloader downloadFileFromPath:package.screenshotPath progress:progress completion:^(NSData *responseData, NSError *error) { - if (error) + if (error) { + NSLog(@"[Alcatraz] Failed to load screenshot of package \"%@\": %@", package.name, error); return; + } NSImage *image = [[NSImage alloc] initWithData:responseData]; - if (!image.isValid) + if (!image.isValid) { + NSLog(@"[Alcatraz] Invalid image data for screenshot of package \"%@\"", package.name); return; + } [self cacheImage:image forPackage:package]; if (completion)