]> err.no Git - sope/commitdiff
stop path traversal as soon as an exception was encountered
authorznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Wed, 25 Jan 2006 19:18:47 +0000 (19:18 +0000)
committerznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Wed, 25 Jan 2006 19:18:47 +0000 (19:18 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1205 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/NGObjWeb/ChangeLog
sope-appserver/NGObjWeb/SoObjects/SoObject+Traversal.m
sope-appserver/NGObjWeb/Version

index adfb7394c7b650427fcda019b6586343869295e6..43e69e983cc36814d7b056a1c1b10d0bde0951db 100644 (file)
@@ -1,5 +1,8 @@
 2006-01-25  Marcus Mueller  <znek@mulle-kybernetik.com>
 
+       * SoObjects/SoObject+Traversal.m: stop traversal immediately if an
+         exception was returned (v4.5.218)
+
        * SoObjects/SoObject+Traversal.m: minor code cleanups (v4.5.217)
 
 2005-11-21  Helge Hess  <helge.hess@skyrix.com>
index c695ca124917fea4aebdaae6646e33ff460b35d5..da91676d90a4054c08193d7a1f9ef2c54715177a 100644 (file)
@@ -165,13 +165,18 @@ static BOOL _isDebugOn(void) {
   //       which doesn't check permissions.
   // Note: You can also use SoSubContext to accomplish that, but this is not
   //       very convenient.
-  register BOOL doDebug = _isDebugOn();
+  register BOOL  doDebug          = _isDebugOn();
+  static   Class NSExceptionClass = Nil;
   WORequest *rq;
   BOOL      isCreateIfMissingMethod = NO;
   BOOL      isCreateMethod = NO;
   unsigned  i, count;
   id        root, currentObject, clientObject;
-  
+
+  if (NSExceptionClass == Nil) {
+    NSExceptionClass = [NSException class];
+  }
+
   if (doDebug) {
     [self logWithFormat:@"traverse%s: %@",
                         _acquire ? "(acquire)" : "",
@@ -311,7 +316,11 @@ static BOOL _isDebugOn(void) {
              @"is not callable: %@",
              currentObject];
     }
-    
+
+    /* abort traversal if an exception was returned */
+    if ([currentObject isKindOfClass:NSExceptionClass])
+      break;
+
     /* found an object */
     currentObject = nextObject;
     [_ctx addObjectToTraversalStack:currentObject];
index 779d561821398b699a26b79dfc8982f719fee0a7..cab29a95d48ddc2911a4d3032a431391bdae074f 100644 (file)
@@ -1,6 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=217
+SUBMINOR_VERSION:=218
 
 # v4.5.214 requires libNGExtensions v4.5.179
 # v4.5.122 requires libNGExtensions v4.5.153