@@ -13,19 +13,19 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" + +#include #import "OFCountedSet.h" #import "OFCountedSet_hashtable.h" #import "OFNumber.h" #import "OFString.h" #import "OFXMLElement.h" -#import "OFNotImplementedException.h" - #import "autorelease.h" static struct { Class isa; } placeholder; @@ -96,13 +96,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 OFCountedSet + (void)initialize @@ -120,23 +122,26 @@ } - init { if (object_getClass(self) == [OFCountedSet 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]; } - (size_t)countForObject: (id)object { - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; + [self doesNotRecognizeSelector: _cmd]; + abort(); } - (OFString*)description { OFMutableString *ret;