@@ -19,10 +19,12 @@ #import "OFUnsupportedProtocolException.h" #import "OFString.h" #import "OFURL.h" @implementation OFUnsupportedProtocolException +@synthesize URL = _URL; + + (instancetype)exceptionWithURL: (OFURL*)url { return [[[self alloc] initWithURL: url] autorelease]; } @@ -33,16 +35,11 @@ - initWithURL: (OFURL*)URL { self = [super init]; - @try { - _URL = [URL copy]; - } @catch (id e) { - [self release]; - @throw e; - } + _URL = [URL retain]; return self; } - (void)dealloc @@ -55,11 +52,6 @@ - (OFString*)description { return [OFString stringWithFormat: @"The protocol of URL %@ is not supported!", _URL]; } - -- (OFURL*)URL -{ - OF_GETTER(_URL, true) -} @end