@@ -18,15 +18,15 @@ #include #import "OFCondition.h" #import "OFDate.h" -#import "OFConditionBroadcastFailedException.h" -#import "OFConditionSignalFailedException.h" +#import "OFBroadcastConditionFailedException.h" #import "OFConditionStillWaitingException.h" -#import "OFConditionWaitFailedException.h" #import "OFInitializationFailedException.h" +#import "OFSignalConditionFailedException.h" +#import "OFWaitForConditionFailedException.h" @implementation OFCondition + (instancetype)condition { return [[[self alloc] init] autorelease]; @@ -66,11 +66,11 @@ - (void)wait { int error = OFPlainConditionWait(&_condition, &_mutex); if (error != 0) - @throw [OFConditionWaitFailedException + @throw [OFWaitForConditionFailedException exceptionWithCondition: self errNo: error]; } #ifdef OF_AMIGAOS @@ -78,11 +78,11 @@ { int error = OFPlainConditionWaitOrExecSignal(&_condition, &_mutex, signalMask); if (error != 0) - @throw [OFConditionWaitFailedException + @throw [OFWaitForConditionFailedException exceptionWithCondition: self errNo: error]; } #endif @@ -93,11 +93,11 @@ if (error == ETIMEDOUT) return false; if (error != 0) - @throw [OFConditionWaitFailedException + @throw [OFWaitForConditionFailedException exceptionWithCondition: self errNo: error]; return true; } @@ -111,11 +111,11 @@ if (error == ETIMEDOUT) return false; if (error != 0) - @throw [OFConditionWaitFailedException + @throw [OFWaitForConditionFailedException exceptionWithCondition: self errNo: error]; return true; } @@ -137,20 +137,20 @@ - (void)signal { int error = OFPlainConditionSignal(&_condition); if (error != 0) - @throw [OFConditionSignalFailedException + @throw [OFSignalConditionFailedException exceptionWithCondition: self errNo: error]; } - (void)broadcast { int error = OFPlainConditionBroadcast(&_condition); if (error != 0) - @throw [OFConditionBroadcastFailedException + @throw [OFBroadcastConditionFailedException exceptionWithCondition: self errNo: error]; } @end