]> err.no Git - sope/commitdiff
improved logs for decoding errors
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 4 Aug 2005 21:47:59 +0000 (21:47 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 4 Aug 2005 21:47:59 +0000 (21:47 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@973 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-core/EOControl/ChangeLog
sope-core/EOControl/EOKeyValueArchiver.m
sope-core/EOControl/Version

index 8b94d3a03311bfc0300840bde4d5e9402282aeee..8039c15c5af5d2931e01de17b5cc0ed1e6c876e8 100644 (file)
@@ -1,3 +1,8 @@
+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
index 6ef7cb28fdff74ecb2472edfb5b752a5c883664d..f2eabf527bb1b258ec62552b902df1ea29ff4bf2 100644 (file)
@@ -195,16 +195,27 @@ static BOOL isPListObject(id _obj) {
     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;
index 1e1b1b4fc4a61239d7b40fff10fac21af915cc33..0d71e7663cdd42daf5b48bcffc44392a12b595b6 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=55
+SUBMINOR_VERSION:=56