From c0dd42fc6015502fd93caef5cc396fa8ba308c3e Mon Sep 17 00:00:00 2001 From: helge Date: Thu, 21 Feb 2008 22:05:23 +0000 Subject: [PATCH] do not use -setUserInfo: git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1607 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-core/NGExtensions/ChangeLog | 5 +++ .../FdExt.subproj/NGPropertyListParser.m | 32 ++++++++----------- sope-core/NGExtensions/Version | 2 +- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/sope-core/NGExtensions/ChangeLog b/sope-core/NGExtensions/ChangeLog index 8239fae7..f54aba74 100644 --- a/sope-core/NGExtensions/ChangeLog +++ b/sope-core/NGExtensions/ChangeLog @@ -1,3 +1,8 @@ +2008-02-21 Helge Hess + + * FdExt.subproj/NGPropertyListParser.m: fixed NSException not to use + -setUserInfo: (v4.7.199) + 2008-02-11 Helge Hess * EOExt.subproj/EOGlobalID+Ext.m: explicitly include NSString.h to diff --git a/sope-core/NGExtensions/FdExt.subproj/NGPropertyListParser.m b/sope-core/NGExtensions/FdExt.subproj/NGPropertyListParser.m index 8e9fb4cc..04d039da 100644 --- a/sope-core/NGExtensions/FdExt.subproj/NGPropertyListParser.m +++ b/sope-core/NGExtensions/FdExt.subproj/NGPropertyListParser.m @@ -1,5 +1,6 @@ /* - 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. @@ -424,25 +425,19 @@ static NSException *_makeException(NSException *_exception, 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"]; @@ -486,12 +481,13 @@ static NSException *_makeException(NSException *_exception, 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; } diff --git a/sope-core/NGExtensions/Version b/sope-core/NGExtensions/Version index c117e6db..d282e4a0 100644 --- a/sope-core/NGExtensions/Version +++ b/sope-core/NGExtensions/Version @@ -1,6 +1,6 @@ # version -SUBMINOR_VERSION:=198 +SUBMINOR_VERSION:=199 # v4.3.115 requires libFoundation v1.0.59 # v4.2.72 requires libEOControl v4.2.39 -- 2.39.5