@@ -74,17 +74,17 @@ length: (size_t)length { ssize_t ret; if (sock == INVALID_SOCKET) - @throw [OFNotConnectedException exceptionWithClass: isa + @throw [OFNotConnectedException exceptionWithClass: [self class] socket: self]; if (atEndOfStream) { OFReadFailedException *e; - e = [OFReadFailedException exceptionWithClass: isa + e = [OFReadFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; #ifndef _WIN32 e->errNo = ENOTCONN; #else @@ -93,11 +93,11 @@ @throw e; } if ((ret = recv(sock, buffer, length, 0)) < 0) - @throw [OFReadFailedException exceptionWithClass: isa + @throw [OFReadFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; if (ret == 0) atEndOfStream = YES; @@ -107,17 +107,17 @@ - (void)_writeBuffer: (const void*)buffer length: (size_t)length { if (sock == INVALID_SOCKET) - @throw [OFNotConnectedException exceptionWithClass: isa + @throw [OFNotConnectedException exceptionWithClass: [self class] socket: self]; if (atEndOfStream) { OFWriteFailedException *e; - e = [OFWriteFailedException exceptionWithClass: isa + e = [OFWriteFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; #ifndef _WIN32 e->errNo = ENOTCONN; #else @@ -126,11 +126,11 @@ @throw e; } if (send(sock, buffer, length, 0) < length) - @throw [OFWriteFailedException exceptionWithClass: isa + @throw [OFWriteFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; } #ifdef _WIN32 @@ -138,12 +138,13 @@ { u_long v = enable; blocking = enable; if (ioctlsocket(sock, FIONBIO, &v) == SOCKET_ERROR) - @throw [OFSetOptionFailedException exceptionWithClass: isa - stream: self]; + @throw [OFSetOptionFailedException + exceptionWithClass: [self class] + stream: self]; } #endif - (int)fileDescriptor { @@ -151,11 +152,11 @@ } - (void)close { if (sock == INVALID_SOCKET) - @throw [OFNotConnectedException exceptionWithClass: isa + @throw [OFNotConnectedException exceptionWithClass: [self class] socket: self]; close(sock); sock = INVALID_SOCKET;