@@ -22,18 +22,16 @@ #import "OFString.h" #import "common.h" @implementation OFUnsupportedVersionException -+ (instancetype)exceptionWithClass: (Class)class - version: (OFString*)version ++ (instancetype)exceptionWithVersion: (OFString*)version { - return [[[self alloc] initWithClass: class - version: version] autorelease]; + return [[[self alloc] initWithVersion: version] autorelease]; } -- initWithClass: (Class)class +- init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @@ -41,14 +39,13 @@ } abort(); } -- initWithClass: (Class)class - version: (OFString*)version +- initWithVersion: (OFString*)version { - self = [super initWithClass: class]; + self = [super init]; @try { _version = [version copy]; } @catch (id e) { [self release]; @@ -66,14 +63,14 @@ } - (OFString*)description { return [OFString stringWithFormat: - @"Version %@ of the format or protocol is not supported by class " - @"%@", _version, _inClass]; + @"Version %@ of the format or protocol is not supported!", + _version]; } - (OFString*)version { OF_GETTER(_version, false) } @end