Skip to content
This repository was archived by the owner on Sep 4, 2018. It is now read-only.

Commit 4c74ec9

Browse files
Log when packages screenshots fail to download
1 parent e99b8f7 commit 4c74ec9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Alcatraz/Controllers/ATZPackageTableViewDelegate.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,16 @@ - (void)fetchAndCacheImageForPackage:(ATZPackage*)package progress:(void(^)(CGFl
189189
[downloader downloadFileFromPath:package.screenshotPath
190190
progress:progress
191191
completion:^(NSData *responseData, NSError *error) {
192-
if (error)
192+
if (error) {
193+
NSLog(@"[Alcatraz] Failed to load screenshot of package \"%@\": %@", package.name, error);
193194
return;
195+
}
194196

195197
NSImage *image = [[NSImage alloc] initWithData:responseData];
196-
if (!image.isValid)
198+
if (!image.isValid) {
199+
NSLog(@"[Alcatraz] Invalid image data for screenshot of package \"%@\"", package.name);
197200
return;
201+
}
198202

199203
[self cacheImage:image forPackage:package];
200204
if (completion)

0 commit comments

Comments
 (0)