*/
#include "NSException+misc.h"
+#import <Foundation/NSNull.h>
#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];
}
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];