Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Parse/Internal/FieldOperation/PFFieldOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ - (PFFieldOperation *)mergeWithPrevious:(PFFieldOperation *)previous {
NSArray *oldArray = (((PFSetOperation *)previous).value);
return [PFSetOperation setWithValue:[self applyToValue:oldArray forKey:nil]];
} else {
[NSException raise:NSInternalInconsistencyException format:@"Operation is invalid after previous operation."];
[NSException raise:NSInternalInconsistencyException format:@"You can't add an item to a non-array."];
return nil;
}
} else if ([previous isKindOfClass:[PFAddUniqueOperation class]]) {
Expand Down Expand Up @@ -336,14 +336,14 @@ - (PFFieldOperation *)mergeWithPrevious:(PFFieldOperation *)previous {
if (!previous) {
return self;
} else if ([previous isKindOfClass:[PFDeleteOperation class]]) {
[NSException raise:NSInternalInconsistencyException format:@"Operation is invalid after previous operation."];
[NSException raise:NSInternalInconsistencyException format:@"You can't remove items from a deleted array."];
return nil;
} else if ([previous isKindOfClass:[PFSetOperation class]]) {
if ([((PFSetOperation *)previous).value isKindOfClass:[NSArray class]]) {
NSArray *oldArray = ((PFSetOperation *)previous).value;
return [PFSetOperation setWithValue:[self applyToValue:oldArray forKey:nil]];
} else {
[NSException raise:NSInternalInconsistencyException format:@"Operation is invalid after previous operation."];
[NSException raise:NSInternalInconsistencyException format:@"You can't add an item to a non-array."];
return nil;
}
} else if ([previous isKindOfClass:[PFRemoveOperation class]]) {
Expand Down