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

Commit

Permalink
Merge pull request #27 from ptarjan/better-file-errors
Browse files Browse the repository at this point in the history
Print file's URL that we failed to download. Fixes #20 . Thanks to @ptarjan .
  • Loading branch information
nikDemyankov committed Oct 15, 2015
2 parents afb6a04 + 9a313e9 commit a42229a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ios/Network/HCPFileDownloader.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ - (BOOL)executeFileDownloadFromURL:(NSURL *)url saveToFile:(NSURL *)fileURL chec
*error = nil;
NSData *downloadedContent = [NSData dataWithContentsOfURL:url];
if (downloadedContent == nil) {
*error = [NSError errorWithCode:0 description:@"Failed to load file"];
NSString *message = [NSString stringWithFormat:@"Failed to load file: %@", url];
*error = [NSError errorWithCode:0 description:message];
return NO;
}

Expand Down

0 comments on commit a42229a

Please sign in to comment.