@@ -23,18 +23,16 @@ #import "OFURL.h" #import "common.h" @implementation OFUnsupportedProtocolException -+ (instancetype)exceptionWithClass: (Class)class - URL: (OFURL*)url ++ (instancetype)exceptionWithURL: (OFURL*)url { - return [[[self alloc] initWithClass: class - URL: url] autorelease]; + return [[[self alloc] initWithURL: url] autorelease]; } -- initWithClass: (Class)class +- init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @@ -42,14 +40,13 @@ } abort(); } -- initWithClass: (Class)class - URL: (OFURL*)URL +- initWithURL: (OFURL*)URL { - self = [super initWithClass: class]; + self = [super init]; @try { _URL = [URL copy]; } @catch (id e) { [self release]; @@ -67,14 +64,13 @@ } - (OFString*)description { return [OFString stringWithFormat: - @"The protocol of URL %@ is not supported by class %@", _URL, - _inClass]; + @"The protocol of URL %@ is not supported!", _URL]; } - (OFURL*)URL { OF_GETTER(_URL, false) } @end