+2005-08-04 Helge Hess <helge.hess@opengroupware.org>
+
+ * EOKeyValueArchiver.m: print a warning if a class specified in the
+ archive could not be found (v4.5.56)
+
2005-08-04 Helge Hess <helge.hess@skyrix.com>
* v4.5.55
obj = [[self->plist copy] autorelease];
}
else if ((className = [self->plist objectForKey:@"class"]) != nil) {
- obj = [[self classForName:className] alloc];
- obj = [obj initWithKeyValueUnarchiver:self];
+ Class clazz;
+
+ if ((clazz = [self classForName:className]) != nil) {
+ obj = [clazz alloc];
+ obj = [obj initWithKeyValueUnarchiver:self];
- if (obj != nil)
- [self->unarchivedObjects addObject:obj];
+ if (obj != nil)
+ [self->unarchivedObjects addObject:obj];
+ else {
+ NSLog(@"WARNING(%s): could not unarchive object %@",
+ __PRETTY_FUNCTION__, self->plist);
+ }
+ if (self->unarchivedObjects != nil)
+ [obj release];
+ else
+ [obj autorelease];
+ }
else {
- NSLog(@"WARNING(%s): could not unarchive object %@",
- __PRETTY_FUNCTION__, self->plist);
+ NSLog(@"WARNING(%s): did not find class specified in archive '%@': %@",
+ __PRETTY_FUNCTION__, className, self->plist);
}
- [obj release];
}
else {
obj = nil;