+2005-07-22 Helge Hess <helge.hess@opengroupware.org>
+
+ * FdExt.subproj/NSException+misc.m: added -isException and
+ -isExceptionOrNull methods to NSObject to check whether a given
+ object is an exception (v4.5.166)
+
2005-07-20 Helge Hess <helge.hess@opengroupware.org>
* FdExt.subproj/NSNull+misc.m: fixed a stupid bug in -isNotEmpty
*/
#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];
}
@end
+@interface NSObject(NSExceptionNGMiscellaneous)
+- (BOOL)isException;
+- (BOOL)isExceptionOrNull;
+@end
+
#if COCOA_Foundation_LIBRARY || GNUSTEP_BASE_LIBRARY
@interface NSException (NGLibFoundationCompatibility)