Merge pull request #854 from Gabro/patch-1
More explicit error message in case of nil completedBlock
This commit is contained in:
commit
15cda1b561
|
@ -112,7 +112,7 @@
|
|||
progress:(SDWebImageDownloaderProgressBlock)progressBlock
|
||||
completed:(SDWebImageCompletionWithFinishedBlock)completedBlock {
|
||||
// Invoking this method without a completedBlock is pointless
|
||||
NSParameterAssert(completedBlock);
|
||||
NSAssert(completedBlock != nil, @"If you mean to prefetch the image, use -[SDWebImagePrefetcher prefetchURLs] instead");
|
||||
|
||||
// Very common mistake is to send the URL using NSString object instead of NSURL. For some strange reason, XCode won't
|
||||
// throw any warning for this type mismatch. Here we failsafe this error by allowing URLs to be passed as NSString.
|
||||
|
|
Loading…
Reference in New Issue