2 Copyright (C) 2000-2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #include "NSException+misc.h"
26 @implementation NSException(NGMiscellaneous)
28 - (id)initWithReason:(NSString *)_reason {
29 return [self initWithReason:_reason userInfo:nil];
31 - (id)initWithReason:(NSString *)_reason userInfo:(id)_userInfo {
32 return [self initWithName:NSStringFromClass([self class])
37 - (id)initWithFormat:(NSString *)_format,... {
41 va_start(ap, _format);
42 tmp = [[NSString allocWithZone:[self zone]]
43 initWithFormat:_format arguments:ap];
46 self = [self initWithReason:tmp userInfo:nil];
47 [tmp release]; tmp = nil;
51 - (id)copyWithZone:(NSZone *)_zone {
52 // TODO: should make a real copy?
56 @end /* NSException(NGMiscellaneous) */
58 #if COCOA_Foundation_LIBRARY || NeXT_Foundation_LIBRARY
60 @implementation NSException (NGLibFoundationCompatibility)
61 - (void)setReason:(NSString *)_reason {
63 [self->reason release];
64 self->reason = _reason;
68 #elif GNUSTEP_BASE_LIBRARY
70 @implementation NSException (NGLibFoundationCompatibility)
71 - (void)setReason:(NSString *)_reason {
73 [self->_e_reason release];
74 self->_e_reason = _reason;
80 void __link_NGExtensions_NSExceptionMisc() {
81 __link_NGExtensions_NSExceptionMisc();