Use a warning, do not throw an exception, when setStringValue: is called

with nil argument


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11572 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2001-11-30 13:18:01 +00:00
parent f90488b0e2
commit eadda82a38

View file

@ -324,8 +324,12 @@ static NSColor *shadowCol;
{
NSString *string = aString;
/* We refuse nil for compatibiliy with MacOS X, which refuses nil */
NSAssert (string != nil, NSInvalidArgumentException);
/* We warn about nil for compatibiliy with MacOS X, which refuses
nil */
if (string == nil)
{
NSWarnMLog (@"attempt to use nil as string value");
}
_cell.type = NSTextCellType;
_cell.contents_is_attributed_string = NO;