Skip to content

Commit

Permalink
Getting rid of NSAssert--throwing a more descriptive error
Browse files Browse the repository at this point in the history
  • Loading branch information
asciimike committed Feb 21, 2016
1 parent 693e255 commit 579d7e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion FirebaseUI/Core/Implementation/FirebaseArray.m
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ - (id)objectAtIndexedSubscript:(NSUInteger)index{
}

- (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)index{
NSAssert(NO, @"Subscripting is read-only on FirebaseArray");
@throw [NSException exceptionWithName:@"FirebaseArraySetIndexWithSubscript"
reason:@"Setting an object as FirebaseArray[i] is not supported."
userInfo:nil];
}

@end

0 comments on commit 579d7e4

Please sign in to comment.