X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sope-core%2FNGExtensions%2FFdExt.subproj%2FNSException%2Bmisc.m;h=254490be55bd64dbe4a05e726ea9ff7a3ecec837;hb=2afe19d91f4d52c499e4772bd2f5f8290874c649;hp=28adb74510b26052e14df2876199b8e0d9f28604;hpb=4d91b8d73b64594d7d5c49ba480cfbadd44852c3;p=sope diff --git a/sope-core/NGExtensions/FdExt.subproj/NSException+misc.m b/sope-core/NGExtensions/FdExt.subproj/NSException+misc.m index 28adb745..254490be 100644 --- a/sope-core/NGExtensions/FdExt.subproj/NSException+misc.m +++ b/sope-core/NGExtensions/FdExt.subproj/NSException+misc.m @@ -20,10 +20,40 @@ */ #include "NSException+misc.h" +#import #include "common.h" +@implementation NSObject(NSExceptionNGMiscellaneous) + +- (BOOL)isException { + return NO; +} +- (BOOL)isExceptionOrNull { + return NO; +} + +@end /* NSObject(NSExceptionNGMiscellaneous) */ + +@implementation NSNull(NSExceptionNGMiscellaneous) + +- (BOOL)isException { + return NO; +} +- (BOOL)isExceptionOrNull { + return YES; +} + +@end /* NSNull(NSExceptionNGMiscellaneous) */ + @implementation NSException(NGMiscellaneous) +- (BOOL)isException { + return YES; +} +- (BOOL)isExceptionOrNull { + return YES; +} + - (id)initWithReason:(NSString *)_reason { return [self initWithReason:_reason userInfo:nil]; } @@ -41,9 +71,9 @@ NSLog(@"ERROR(%s): missing format!", __PRETTY_FUNCTION__); va_start(ap, _format); - tmp = [[NSString allocWithZone:[self zone]] - initWithFormat:_format ? _format : @"Exception" - arguments:ap]; + tmp = [[NSString alloc] initWithFormat: + _format ? _format : (NSString *)@"Exception" + arguments:ap]; va_end(ap); self = [self initWithReason:tmp userInfo:nil];