From 7f329b47142b889b17a4a4c486c209e368b3125d Mon Sep 17 00:00:00 2001 From: Andrew McCallum Date: Tue, 26 Mar 1996 20:52:17 +0000 Subject: [PATCH] ([OrderedCollection -putObject:atIndex:]): Return type changed from id to void. Use NSException, not error:. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1274 72102866-910b-0410-8b05-ffd578937521 --- Source/OrderedCollection.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/OrderedCollection.m b/Source/OrderedCollection.m index 05dff556e..01c365c76 100644 --- a/Source/OrderedCollection.m +++ b/Source/OrderedCollection.m @@ -230,7 +230,7 @@ // OVERRIDE SOME KEYED COLLECTION METHODS; /* Semantics: You can "put" an element only at index "count" or less */ -- putObject: newObject atIndex: (unsigned)index +- (void) putObject: newObject atIndex: (unsigned)index { unsigned c = [self count]; @@ -239,8 +239,9 @@ else if (index == c) [self appendObject: newObject]; else - [self error:"in %s, can't put an element at index beyond [self count]"]; - return self; + [NSException + raise: NSRangeException + format: @"in %s, can't put an element at index beyond [self count]"]; } - putObject: newObject atKey: index