+2008-02-21 Helge Hess <helge.hess@opengroupware.org>
+
+ * FdExt.subproj/NGPropertyListParser.m: fixed NSException not to use
+ -setUserInfo: (v4.7.199)
+
2008-02-11 Helge Hess <helge.hess@opengroupware.org>
* EOExt.subproj/EOGlobalID+Ext.m: explicitly include NSString.h to
/*
- Copyright (C) 2000-2005 SKYRIX Software AG
+ Copyright (C) 2000-2008 SKYRIX Software AG
+ Copyright (C) 2008 Helge Hess
This file is part of SOPE.
int numLines = _numberOfLines(_buffer, _idx);
BOOL atEof = (_idx >= _len) ? YES : NO;
- if (_exception) // error resulted from a previous error (exception already set)
+ if (_exception != nil)
+ // error resulted from a previous error (exception already set)
return _exception;
- exception = [NSException exceptionWithName:@"SyntaxErrorException"
- reason:nil
- userInfo:nil];
-
_text = atEof
? [NSString stringWithFormat:@"Unexpected end: %@", _text]
- : [NSString stringWithFormat:@"Syntax error in line %i: %@", numLines,_text];
-
- [exception setReason:_text];
-
+ : [NSString stringWithFormat:@"Syntax error in line %i: %@",
+ numLines,_text];
+
// user info
{
- ui = [[exception userInfo] mutableCopy];
- if (ui == nil)
- ui = [[NSMutableDictionary alloc] initWithCapacity:8];
-
+ ui = [[NSMutableDictionary alloc] initWithCapacity:8];
+
[ui setObject:[NSNumber numberWithInt:numLines] forKey:@"line"];
[ui setObject:[NSNumber numberWithInt:_len] forKey:@"size"];
[ui setObject:[NSNumber numberWithInt:_idx] forKey:@"position"];
else
NSLog(@"startPos=0x%p endPos=0x%p", startPos, endPos);
}
-
- [exception setUserInfo:ui];
-
- [ui release]; ui = nil;
}
+ exception = [NSException exceptionWithName:@"SyntaxErrorException"
+ reason:_text
+ userInfo:ui];
+ [ui release]; ui = nil;
+
return exception;
}