Skip to content

Commit 3cfc1bb

Browse files
Merge pull request #108 from ParsePlatform/richardross.assertions
Fixed assertion messages that were unintentionally changed in #86.
2 parents cfa7fcf + 5005732 commit 3cfc1bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Parse/Internal/FieldOperation/PFFieldOperation.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ - (PFFieldOperation *)mergeWithPrevious:(PFFieldOperation *)previous {
267267
NSArray *oldArray = (((PFSetOperation *)previous).value);
268268
return [PFSetOperation setWithValue:[self applyToValue:oldArray forKey:nil]];
269269
} else {
270-
[NSException raise:NSInternalInconsistencyException format:@"Operation is invalid after previous operation."];
270+
[NSException raise:NSInternalInconsistencyException format:@"You can't add an item to a non-array."];
271271
return nil;
272272
}
273273
} else if ([previous isKindOfClass:[PFAddUniqueOperation class]]) {
@@ -336,14 +336,14 @@ - (PFFieldOperation *)mergeWithPrevious:(PFFieldOperation *)previous {
336336
if (!previous) {
337337
return self;
338338
} else if ([previous isKindOfClass:[PFDeleteOperation class]]) {
339-
[NSException raise:NSInternalInconsistencyException format:@"Operation is invalid after previous operation."];
339+
[NSException raise:NSInternalInconsistencyException format:@"You can't remove items from a deleted array."];
340340
return nil;
341341
} else if ([previous isKindOfClass:[PFSetOperation class]]) {
342342
if ([((PFSetOperation *)previous).value isKindOfClass:[NSArray class]]) {
343343
NSArray *oldArray = ((PFSetOperation *)previous).value;
344344
return [PFSetOperation setWithValue:[self applyToValue:oldArray forKey:nil]];
345345
} else {
346-
[NSException raise:NSInternalInconsistencyException format:@"Operation is invalid after previous operation."];
346+
[NSException raise:NSInternalInconsistencyException format:@"You can't add an item to a non-array."];
347347
return nil;
348348
}
349349
} else if ([previous isKindOfClass:[PFRemoveOperation class]]) {

0 commit comments

Comments
 (0)