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

Commit

Permalink
Log when packages screenshots fail to download
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumealgis committed Aug 23, 2016
1 parent 9750076 commit 5249464
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Alcatraz/Controllers/ATZPackageTableViewDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5249464

Please sign in to comment.