@@ -500,7 +500,7 @@ + (BFTask *)_deepSaveAsyncChildrenOfObject:(id)object withCurrentUser:(PFUser *)
500500 [object _objectWillSave ];
501501 NSError *error;
502502 if (![object _checkSaveParametersWithCurrentUser: currentUser error: &error]) {
503- return error;
503+ return [BFTask taskWithError: error] ;
504504 }
505505 command = [object _constructSaveCommandForChanges: [object unsavedChanges ]
506506 sessionToken: sessionToken
@@ -626,7 +626,7 @@ + (BFTask *)_enqueueSaveEventuallyChildrenOfObject:(PFObject *)object currentUse
626626 // We do cycle-detection when building the list of objects passed to this
627627 // function, so this should never get called. But we should check for it
628628 // anyway, so that we get an exception instead of an infinite loop.
629- PFPrecondition (current.count != 0 , @" Unable to save a PFObject with a relation to a cycle." );
629+ PFPreconditionWithTask (current.count != 0 , @" Unable to save a PFObject with a relation to a cycle." );
630630
631631 // If a lazy user is one of the objects in the array, resolve its laziness now and
632632 // remove it from the list of things to save.
@@ -1467,7 +1467,7 @@ - (BFTask *)saveAsync:(BFTask *)toAwait {
14671467 return [[childrenTask continueWithSuccessBlock: ^id (BFTask *task) {
14681468 NSError *error;
14691469 if (![self _checkSaveParametersWithCurrentUser: currentUser error: &error]) {
1470- return error;
1470+ return [BFTask taskWithError: error] ;
14711471 }
14721472 PFRESTCommand *command = [self _constructSaveCommandForChanges: changes
14731473 sessionToken: sessionToken
0 commit comments