@@ -32,11 +32,11 @@ #import "OFSelectKernelEventObserver.h" #import "OFArray.h" #import "OFSocket+Private.h" #import "OFInitializationFailedException.h" -#import "OFObserveFailedException.h" +#import "OFObserveKernelEventsFailedException.h" #import "OFOutOfRangeException.h" #ifdef OF_AMIGAOS # include #endif @@ -82,12 +82,13 @@ - (void)addObjectForReading: (id )object { int fd = object.fileDescriptorForReading; if (fd < 0) - @throw [OFObserveFailedException exceptionWithObserver: self - errNo: EBADF]; + @throw [OFObserveKernelEventsFailedException + exceptionWithObserver: self + errNo: EBADF]; if (fd > INT_MAX - 1) @throw [OFOutOfRangeException exception]; #ifndef OF_WINDOWS @@ -106,12 +107,13 @@ - (void)addObjectForWriting: (id )object { int fd = object.fileDescriptorForWriting; if (fd < 0) - @throw [OFObserveFailedException exceptionWithObserver: self - errNo: EBADF]; + @throw [OFObserveKernelEventsFailedException + exceptionWithObserver: self + errNo: EBADF]; if (fd > INT_MAX - 1) @throw [OFOutOfRangeException exception]; #ifndef OF_WINDOWS @@ -132,12 +134,13 @@ /* TODO: Adjust _maxFD */ int fd = object.fileDescriptorForReading; if (fd < 0) - @throw [OFObserveFailedException exceptionWithObserver: self - errNo: EBADF]; + @throw [OFObserveKernelEventsFailedException + exceptionWithObserver: self + errNo: EBADF]; #ifndef OF_WINDOWS if (fd >= (int)FD_SETSIZE) @throw [OFOutOfRangeException exception]; #endif @@ -152,12 +155,13 @@ /* TODO: Adjust _maxFD */ int fd = object.fileDescriptorForWriting; if (fd < 0) - @throw [OFObserveFailedException exceptionWithObserver: self - errNo: EBADF]; + @throw [OFObserveKernelEventsFailedException + exceptionWithObserver: self + errNo: EBADF]; #ifndef OF_WINDOWS if (fd >= (int)FD_SETSIZE) @throw [OFOutOfRangeException exception]; @@ -204,12 +208,13 @@ #endif timeout.tv_usec = (int)((timeInterval - timeout.tv_sec) * 1000000); #ifdef OF_AMIGAOS if ((cancelSignal = AllocSignal(-1)) == (BYTE)-1) - @throw [OFObserveFailedException exceptionWithObserver: self - errNo: EAGAIN]; + @throw [OFObserveKernelEventsFailedException + exceptionWithObserver: self + errNo: EAGAIN]; execSignalMask = _execSignalMask | (1ul << cancelSignal); Forbid(); @@ -229,11 +234,11 @@ events = select(_maxFD + 1, &readFDs, &writeFDs, NULL, (timeInterval != -1 ? &timeout : NULL)); #endif if (events < 0) - @throw [OFObserveFailedException + @throw [OFObserveKernelEventsFailedException exceptionWithObserver: self errNo: OFSocketErrNo()]; #ifdef OF_AMIGAOS if (execSignalMask != 0 &&