In PHPhotoLibrary is there a list of known errors for method performChanges?

I'm removing some pictures from iOS camera roll using PHPhotoLibrary. Here's the code snippet I use:


PHPhotoLibrary *library = [PHPhotoLibrary sharedPhotoLibrary];
[library performChanges:^{ 
     PHFetchResult* assetResult = [PHAsset fetchAssetsWithLocalIdentifiers:assets options:nil];
      [PHAssetChangeRequest deleteAssets:assetResult]; 
} completionHandler:^(BOOL success, NSError *error) {
      if (error != nil) {
           NSLog(@"error: %ld", (long)error.code);
      }
}];


Where assets is an array of local uuids. The completionHandler can contain an error object, but I can't find a list of known errors.

For example, executing this code will ask the user for a confirmation and if the user cancel it the error will be -1 but I can't find any official source that states this.

Is there even an unofficial list? Any of you have practical experience with it?

ALAssetsLibrary returns various kind of errors which defined in ALAssetsLibrary.h.


But PHPhotoLibrary doesn't return detailed errors.

As you say, it just return general error as ErrorDomain=NSCocoaErrorDomain, ErrorCode=-1.

I asked same kind of question to Apple TSI(Technical Support Incident) before.

From their answer, at least PHPhotoLibrary doesn't return

DiskSpaceError (ALAssetsLibraryWriteDiskSpaceError in case of ALAssetsLibrary)

and

WriteBusyError (ALAssetsLibraryWriteBusyError in case of ALAssetsLibrary)

It just returns nereral error.

In PHPhotoLibrary is there a list of known errors for method performChanges?
 
 
Q