@@ -14,20 +14,20 @@ * file. */ #include "config.h" +#include #include #include #import "OFMapTable.h" #import "OFEnumerator.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" -#import "OFNotImplementedException.h" #import "OFOutOfRangeException.h" #import "macros.h" #define MIN_CAPACITY 16 @@ -88,14 +88,17 @@ capacity: capacity] autorelease]; } - init { - Class c = [self class]; - [self release]; - @throw [OFNotImplementedException exceptionWithClass: c - selector: _cmd]; + @try { + [self doesNotRecognizeSelector: _cmd]; + abort(); + } @catch (id e) { + [self release]; + @throw e; + } } - initWithKeyFunctions: (of_map_table_functions_t)keyFunctions_ valueFunctions: (of_map_table_functions_t)valueFunctions_ { @@ -622,14 +625,17 @@ @end @implementation OFMapTableEnumerator - init { - Class c = [self class]; - [self release]; - @throw [OFNotImplementedException exceptionWithClass: c - selector: _cmd]; + @try { + [self doesNotRecognizeSelector: _cmd]; + abort(); + } @catch (id e) { + [self release]; + @throw e; + } } - OF_initWithMapTable: (OFMapTable*)mapTable_ buckets: (struct of_map_table_bucket**)buckets_ capacity: (uint32_t)capacity_ @@ -653,12 +659,12 @@ [super dealloc]; } - (void*)nextValue { - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; + [self doesNotRecognizeSelector: _cmd]; + abort(); } - (void)reset { if (*mutationsPtr != mutations)