@@ -13,29 +13,32 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" + +#include #import "OFXMLNode.h" #import "OFString.h" -#import "OFNotImplementedException.h" - @implementation OFXMLNode - initWithSerialization: (OFXMLElement*)element { - Class c = [self class]; - [self release]; - @throw [OFNotImplementedException exceptionWithClass: c - selector: _cmd]; + @try { + [self doesNotRecognizeSelector: _cmd]; + abort(); + } @catch (id e) { + [self release]; + @throw e; + } } - (OFString*)stringValue { - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; + [self doesNotRecognizeSelector: _cmd]; + abort(); } - (intmax_t)decimalValue { return [[self stringValue] decimalValue]; @@ -69,25 +72,25 @@ } - (OFString*)XMLStringWithIndentation: (unsigned int)indentation level: (unsigned int)level { - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; + [self doesNotRecognizeSelector: _cmd]; + abort(); } - (OFString*)description { return [self XMLStringWithIndentation: 2]; } - (OFXMLElement*)XMLElementBySerializing { - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; + [self doesNotRecognizeSelector: _cmd]; + abort(); } - copy { return [self retain]; } @end