mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Better error checking
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3301 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f5bc639c2f
commit
8594a4bb3e
2 changed files with 14 additions and 1 deletions
|
@ -142,6 +142,12 @@ serializeToInfo(id object, _NSSerializerInfo* info)
|
|||
{
|
||||
Class c = fastClass(object);
|
||||
|
||||
if (fastIsClass(c) == NO)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Class (%@) in property list - expected instance",
|
||||
[c description]];
|
||||
}
|
||||
if (c == _fastCls._NSGCString || c == _fastCls._NSGMutableCString ||
|
||||
c == _fastCls._NXConstantString)
|
||||
{
|
||||
|
@ -258,7 +264,8 @@ serializeToInfo(id object, _NSSerializerInfo* info)
|
|||
else
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Unknown class in property list"];
|
||||
format: @"Unknown class (%@) in property list",
|
||||
[c description]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue