@@ -59,12 +59,12 @@ @try { char *tmp, *tmp2; if ((UTF8String2 = strdup([string UTF8String])) == NULL) @throw [OFOutOfMemoryException - exceptionWithClass: [self class] - requestedSize: [string UTF8StringLength]]; + exceptionWithRequestedSize: [string + UTF8StringLength]]; UTF8String = UTF8String2; if (!strncmp(UTF8String, "file://", 7)) { _scheme = @"file"; @@ -76,12 +76,11 @@ UTF8String += 7; } else if (!strncmp(UTF8String, "https://", 8)) { _scheme = @"https"; UTF8String += 8; } else - @throw [OFInvalidFormatException - exceptionWithClass: [self class]]; + @throw [OFInvalidFormatException exception]; if ((tmp = strchr(UTF8String, '/')) != NULL) { *tmp = '\0'; tmp++; } @@ -119,12 +118,11 @@ pool = objc_autoreleasePoolPush(); portString = [OFString stringWithUTF8String: tmp2]; if ([portString decimalValue] > 65535) - @throw [OFInvalidFormatException - exceptionWithClass: [self class]]; + @throw [OFInvalidFormatException exception]; _port = [portString decimalValue]; if (_port == 0) _port = 80; @@ -197,12 +195,12 @@ _user = [URL->_user copy]; _password = [URL->_password copy]; if ((UTF8String2 = strdup([string UTF8String])) == NULL) @throw [OFOutOfMemoryException - exceptionWithClass: [self class] - requestedSize: [string UTF8StringLength]]; + exceptionWithRequestedSize: + [string UTF8StringLength]]; UTF8String = UTF8String2; if ((tmp = strchr(UTF8String, '#')) != NULL) { *tmp = '\0'; @@ -258,13 +256,11 @@ @try { void *pool = objc_autoreleasePoolPush(); if (![[element name] isEqual: [self className]] || ![[element namespace] isEqual: OF_SERIALIZATION_NS]) - @throw [OFInvalidArgumentException - exceptionWithClass: [self class] - selector: _cmd]; + @throw [OFInvalidArgumentException exception]; self = [self initWithString: [element stringValue]]; objc_autoreleasePoolPop(pool); } @catch (id e) { @@ -374,13 +370,11 @@ } - (void)setScheme: (OFString*)scheme { if (![scheme isEqual: @"http"] && ![scheme isEqual: @"https"]) - @throw [OFInvalidArgumentException - exceptionWithClass: [self class] - selector: _cmd]; + @throw [OFInvalidArgumentException exception]; OF_SETTER(_scheme, scheme, true, 1) } - (OFString*)host @@ -430,13 +424,11 @@ - (void)setPath: (OFString*)path { if (([_scheme isEqual: @"http"] || [_scheme isEqual: @"https"]) && ![path hasPrefix: @"/"]) - @throw [OFInvalidArgumentException - exceptionWithClass: [self class] - selector: _cmd]; + @throw [OFInvalidArgumentException exception]; OF_SETTER(_path, path, true, 1) } - (OFString*)parameters