@@ -14,20 +14,21 @@ * file. */ #include "config.h" +#include + #include #import "OFNumber.h" #import "OFString.h" #import "OFXMLElement.h" #import "OFXMLAttribute.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" -#import "OFNotImplementedException.h" #import "autorelease.h" #import "macros.h" #define RETURN_AS(t) \ @@ -246,11 +247,11 @@ case OF_NUMBER_UINTPTR: \ return [OFNumber numberWithUIntPtr: \ value.uintptr o [n uIntPtrValue]]; \ case OF_NUMBER_FLOAT: \ case OF_NUMBER_DOUBLE: \ - @throw [OFNotImplementedException \ + @throw [OFInvalidArgumentException \ exceptionWithClass: [self class] \ selector: _cmd]; \ default: \ @throw [OFInvalidFormatException \ exceptionWithClass: [self class]]; \ @@ -448,12 +449,17 @@ return [[[self alloc] initWithDouble: double_] autorelease]; } - init { - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; + @try { + [self doesNotRecognizeSelector: _cmd]; + abort(); + } @catch (id e) { + [self release]; + @throw e; + } } - initWithBool: (BOOL)bool_ { self = [super init];