@@ -17,11 +17,10 @@ #import "OFDNSResourceRecord.h" #import "OFArray.h" #import "OFData.h" -#import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" OFString * OFDNSClassName(OFDNSClass DNSClass) { @@ -77,16 +76,12 @@ string = string.uppercaseString; if ([string isEqual: @"IN"]) DNSClass = OFDNSClassIN; else { - @try { - DNSClass = (OFDNSClass) - [string unsignedLongLongValueWithBase: 0]; - } @catch (OFInvalidFormatException *e) { - @throw [OFInvalidArgumentException exception]; - } + DNSClass = + (OFDNSClass)[string unsignedLongLongValueWithBase: 0]; } objc_autoreleasePoolPop(pool); return DNSClass; @@ -123,16 +118,12 @@ else if ([string isEqual: @"SRV"]) recordType = OFDNSRecordTypeSRV; else if ([string isEqual: @"ALL"]) recordType = OFDNSRecordTypeAll; else { - @try { - recordType = (OFDNSRecordType) - [string unsignedLongLongValueWithBase: 0]; - } @catch (OFInvalidFormatException *e) { - @throw [OFInvalidArgumentException exception]; - } + recordType = + (OFDNSRecordType)[string unsignedLongLongValueWithBase: 0]; } objc_autoreleasePoolPop(pool); return recordType;