@@ -787,13 +787,11 @@ delimiterCString = [delimiter cStringWithEncoding: encoding]; delimiterLength = [delimiter cStringLengthWithEncoding: encoding]; j = 0; if (delimiterLength == 0) - @throw [OFInvalidArgumentException - exceptionWithClass: [self class] - selector: _cmd]; + @throw [OFInvalidArgumentException exception]; /* Look if there's something in our buffer */ if (!_waitingForDelimiter && _readBuffer != NULL) { for (i = 0; i < _readBufferLength; i++) { if (_readBuffer[i] != delimiterCString[j++]) @@ -1447,18 +1445,15 @@ { char *UTF8String; int length; if (format == nil) - @throw [OFInvalidArgumentException - exceptionWithClass: [self class] - selector: _cmd]; + @throw [OFInvalidArgumentException exception]; if ((length = of_vasprintf(&UTF8String, [format UTF8String], arguments)) == -1) - @throw [OFInvalidFormatException - exceptionWithClass: [self class]]; + @throw [OFInvalidFormatException exception]; @try { [self writeBuffer: UTF8String length: length]; } @finally { @@ -1490,23 +1485,21 @@ readImplemented = true; if (readFlags == -1) @throw [OFSetOptionFailedException - exceptionWithClass: [self class] - stream: self]; + exceptionWithStream: self]; if (enable) readFlags &= ~O_NONBLOCK; else readFlags |= O_NONBLOCK; if (fcntl([self fileDescriptorForReading], F_SETFL, readFlags) == -1) @throw [OFSetOptionFailedException - exceptionWithClass: [self class] - stream: self]; + exceptionWithStream: self]; } @catch (OFNotImplementedException *e) { } @try { int writeFlags; @@ -1515,30 +1508,27 @@ writeImplemented = true; if (writeFlags == -1) @throw [OFSetOptionFailedException - exceptionWithClass: [self class] - stream: self]; + exceptionWithStream: self]; if (enable) writeFlags &= ~O_NONBLOCK; else writeFlags |= O_NONBLOCK; if (fcntl([self fileDescriptorForWriting], F_SETFL, writeFlags) == -1) @throw [OFSetOptionFailedException - exceptionWithClass: [self class] - stream: self]; + exceptionWithStream: self]; } @catch (OFNotImplementedException *e) { } if (!readImplemented && !writeImplemented) - @throw [OFNotImplementedException - exceptionWithClass: [self class] - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithSelector: _cmd + object: self]; _blocking = enable; #else [self doesNotRecognizeSelector: _cmd]; abort();