@@ -20,11 +20,10 @@ #import "OFXMLElement+Serialization.h" #import "OFSerialization.h" #import "OFString.h" #import "OFInvalidArgumentException.h" -#import "OFNotImplementedException.h" #import "autorelease.h" #import "macros.h" int _OFXMLElement_Serialization_reference; @@ -36,19 +35,19 @@ Class class; id object; if ((class = objc_getClass([name cStringUsingEncoding: OF_STRING_ENCODING_ASCII])) == Nil) - @throw [OFNotImplementedException exceptionWithClass: Nil]; + @throw [OFInvalidArgumentException + exceptionWithClass: [self class]]; if (![class conformsToProtocol: @protocol(OFSerialization)]) - @throw [OFNotImplementedException - exceptionWithClass: class - selector: @selector(initWithSerialization:)]; + @throw [OFInvalidArgumentException + exceptionWithClass: [self class]]; object = [[class alloc] initWithSerialization: self]; objc_autoreleasePoolPop(pool); return [object autorelease]; } @end