@@ -505,13 +505,13 @@ + (BFTask *)_deepSaveAsyncChildrenOfObject:(id)object withCurrentUser:(PFUser *)
505505 }];
506506
507507 return [[BFTask taskForCompletionOfAllTasks: handleSaveTasks] continueAsyncWithBlock: ^id (BFTask *task) {
508- if (commandRunnerTask.error || commandRunnerTask.cancelled || commandRunnerTask. exception ) {
508+ if (commandRunnerTask.faulted || commandRunnerTask.cancelled ) {
509509 return commandRunnerTask;
510510 }
511511
512512 // Reiterate saveAll tasks, return first error.
513513 for (BFTask *handleSaveTask in handleSaveTasks) {
514- if (handleSaveTask.error || handleSaveTask. exception ) {
514+ if (handleSaveTask.faulted ) {
515515 return handleSaveTask;
516516 }
517517 }
@@ -525,20 +525,9 @@ + (BFTask *)_deepSaveAsyncChildrenOfObject:(id)object withCurrentUser:(PFUser *)
525525 }
526526
527527 return [[BFTask taskForCompletionOfAllTasks: tasks] continueWithBlock: ^id (BFTask *task) {
528- // Return the first exception, instead of the aggregated one
529- // for the sake of compatability with old versions
530-
531- if ([task.exception.name isEqualToString: BFTaskMultipleExceptionsException]) {
532- NSException *firstException = [task.exception.userInfo[@" exceptions" ] firstObject ];
533- if (firstException) {
534- return [BFTask taskWithException: firstException];
535- }
536- }
537-
538- if (task.error || task.cancelled || task.exception ) {
528+ if (task.cancelled || task.faulted ) {
539529 return task;
540530 }
541-
542531 return @YES ;
543532 }];
544533 }];
@@ -856,7 +845,7 @@ + (BFTask *)_migrateObjectInBackgroundFromFile:(NSString *)fileName
856845 BFTask *resultTask = [BFTask taskWithResult: object];
857846
858847 // Only delete if we successfully pin it so that it retries the migration next time.
859- if (!task.error && !task. exception && !task.cancelled ) {
848+ if (!task.faulted && !task.cancelled ) {
860849 NSString *path = [[Parse _currentManager ].fileManager parseDataItemPathForPathComponent: fileName];
861850 return [[PFFileManager removeItemAtPathAsync: path] continueWithBlock: ^id (BFTask *task) {
862851 // We don't care if it fails to delete the file, so return the
@@ -1098,7 +1087,7 @@ - (BFTask *)_enqueueSaveEventuallyWithChildren:(BOOL)saveChildren {
10981087 }
10991088 saveTask = [saveTask continueWithBlock: ^id (BFTask *task) {
11001089 @try {
1101- if (!task.isCancelled && !task.exception && !task. error ) {
1090+ if (!task.isCancelled && !task.faulted ) {
11021091 PFCommandResult *result = task.result ;
11031092 // PFPinningEventuallyQueue handle save result directly.
11041093 if (![Parse _currentManager ].offlineStoreLoaded ) {
@@ -1405,7 +1394,7 @@ - (BFTask *)saveAsync:(BFTask *)toAwait {
14051394 return [[Parse _currentManager ].commandRunner runCommandAsync: command
14061395 withOptions: PFCommandRunningOptionRetryIfFailed];
14071396 }] continueAsyncWithBlock: ^id (BFTask *task) {
1408- if (task.isCancelled || task.exception || task. error ) {
1397+ if (task.cancelled || task.faulted ) {
14091398 // If there was an error, we want to roll forward the save changes before rethrowing.
14101399 BFTask *commandRunnerTask = task;
14111400 return [[self handleSaveResultAsync: nil ] continueWithBlock: ^id (BFTask *task) {
0 commit comments