Fix backward compatibility issue

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25230 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-06-08 08:04:14 +00:00
parent 87a3fe94c4
commit dd723fd60e
2 changed files with 8 additions and 2 deletions

View file

@ -2,6 +2,8 @@
* Source/GSString.m Fix bug getting cString from literal string
with illegal (non-ascii) characters.
* Source/NSKeyValueCoding.m: Fix backward compatibility issue with
NSUnknownKeyException.
2007-06-06 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -38,7 +38,11 @@
#include "Foundation/NSKeyValueCoding.h"
#include "Foundation/NSNull.h"
NSString* const NSUndefinedKeyException = @"NSUndefinedKeyException";
/* For backward compatibility NSUndefinedKeyException is actually the same
* as the older NSUnknownKeyException
*/
NSString* const NSUnknownKeyException = @"NSUnknownKeyException";
NSString* const NSUndefinedKeyException = @"NSUnknownKeyException";
static void
@ -349,7 +353,7 @@ static id ValueForKey(NSObject *self, const char *key, unsigned size)
(anObject ? (id)anObject : (id)@"(nil)"), @"NSTargetObjectUserInfoKey",
(aKey ? (id)aKey : (id)@"(nil)"), @"NSUnknownUserInfoKey",
nil];
exp = [NSException exceptionWithName: NSInvalidArgumentException
exp = [NSException exceptionWithName: NSUndefinedKeyException
reason: @"Unable to set nil value for key"
userInfo: dict];
[exp raise];