@@ -14,17 +14,17 @@ * file. */ #include "config.h" +#include + #include #import "OFMutableSet.h" #import "OFMutableSet_hashtable.h" -#import "OFNotImplementedException.h" - #import "autorelease.h" static struct { Class isa; } placeholder; @@ -95,13 +95,15 @@ { } - (void)dealloc { - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; - [super dealloc]; /* Get rid of a stupid warning */ + [self doesNotRecognizeSelector: _cmd]; + abort(); + + /* Get rid of a stupid warning */ + [super dealloc]; } @end @implementation OFMutableSet + (void)initialize @@ -119,29 +121,32 @@ } - init { if (object_getClass(self) == [OFMutableSet class]) { - Class c = [self class]; - [self release]; - @throw [OFNotImplementedException exceptionWithClass: c - selector: _cmd]; + @try { + [self doesNotRecognizeSelector: _cmd]; + abort(); + } @catch (id e) { + [self release]; + @throw e; + } } return [super init]; } - (void)addObject: (id)object { - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; + [self doesNotRecognizeSelector: _cmd]; + abort(); } - (void)removeObject: (id)object { - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; + [self doesNotRecognizeSelector: _cmd]; + abort(); } - (void)minusSet: (OFSet*)set { void *pool = objc_autoreleasePoolPush();