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>
// 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)" : "",
@"is not callable: %@",
currentObject];
}
-
+
+ /* abort traversal if an exception was returned */
+ if ([currentObject isKindOfClass:NSExceptionClass])
+ break;
+
/* found an object */
currentObject = nextObject;
[_ctx addObjectToTraversalStack:currentObject];