@@ -32,12 +32,12 @@ #import "OFConditionSignalFailedException.h" #import "OFConditionWaitFailedException.h" #import "OFConditionWaitingException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" -#import "OFMutexLockedException.h" #import "OFMutexLockFailedException.h" +#import "OFMutexStillLockedException.h" #import "OFMutexUnlockFailedException.h" #import "OFNotImplementedException.h" #import "OFOutOfRangeException.h" #import "OFThreadJoinFailedException.h" #import "OFThreadStartFailedException.h" @@ -383,11 +383,12 @@ } - (void)lock { if (!of_mutex_lock(&mutex)) - @throw [OFMutexLockFailedException newWithClass: isa]; + @throw [OFMutexLockFailedException newWithClass: isa + mutex: self]; } - (BOOL)tryLock { return of_mutex_trylock(&mutex); @@ -394,18 +395,20 @@ } - (void)unlock { if (!of_mutex_unlock(&mutex)) - @throw [OFMutexUnlockFailedException newWithClass: isa]; + @throw [OFMutexUnlockFailedException newWithClass: isa + mutex: self]; } - (void)dealloc { if (initialized) if (!of_mutex_free(&mutex)) - @throw [OFMutexLockedException newWithClass: isa]; + @throw [OFMutexStillLockedException newWithClass: isa + mutex: self]; [super dealloc]; } @end