Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -1351,12 +1351,11 @@ cString[length] = '\0'; return length; #endif default: - @throw [OFNotImplementedException exceptionWithSelector: _cmd - object: self]; + @throw [OFInvalidArgumentException exception]; } } - (size_t)getCString: (char *)cString maxLength: (size_t)maxLength @@ -1433,11 +1432,11 @@ @throw e; } break; default: - @throw [OFInvalidEncodingException exception]; + @throw [OFInvalidArgumentException exception]; } @try { ret = [[OFData dataWithItemsNoCopy: cString count: cStringLength + 1 @@ -1504,11 +1503,11 @@ case OFStringEncodingMacRoman: case OFStringEncodingKOI8R: case OFStringEncodingKOI8U: return self.length; default: - @throw [OFInvalidEncodingException exception]; + @throw [OFInvalidArgumentException exception]; } } - (size_t)UTF8StringLength { Index: src/OFUTF8String.m ================================================================== --- src/OFUTF8String.m +++ src/OFUTF8String.m @@ -344,11 +344,11 @@ #ifdef HAVE_KOI8_U CASE(OFStringEncodingKOI8U, OFKOI8UTable) #endif #undef CASE default: - @throw [OFInvalidEncodingException exception]; + @throw [OFInvalidArgumentException exception]; } j = 0; for (size_t i = 0; i < cStringLength; i++) { unsigned char character = (unsigned char)cString[i];