mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Improve message in exception when we perform on a finished thread
This commit is contained in:
parent
925f1dd5e1
commit
7fd95c877f
1 changed files with 13 additions and 14 deletions
|
@ -1690,7 +1690,9 @@ GSRunLoopInfoForThread(NSThread *aThread)
|
|||
if ([aThread isFinished] == YES)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"perform on finished thread"];
|
||||
format: @"perform [%@-%@] attempted on finished thread",
|
||||
NSStringFromClass([self class]),
|
||||
NSStringFromSelector(aSelector)];
|
||||
}
|
||||
if (aFlag == YES)
|
||||
{
|
||||
|
@ -1708,21 +1710,18 @@ GSRunLoopInfoForThread(NSThread *aThread)
|
|||
[l lockWhenCondition: 1];
|
||||
[l unlock];
|
||||
RELEASE(l);
|
||||
if ([h isInvalidated] == YES)
|
||||
if ([h isInvalidated] == NO)
|
||||
{
|
||||
RELEASE(h);
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"perform on finished thread"];
|
||||
}
|
||||
/* If we have an exception passed back from the remote thread,
|
||||
* re-raise it.
|
||||
*/
|
||||
if (nil != h->exception)
|
||||
{
|
||||
NSException *e = AUTORELEASE(RETAIN(h->exception));
|
||||
/* If we have an exception passed back from the remote thread,
|
||||
* re-raise it.
|
||||
*/
|
||||
if (nil != h->exception)
|
||||
{
|
||||
NSException *e = AUTORELEASE(RETAIN(h->exception));
|
||||
|
||||
RELEASE(h);
|
||||
[e raise];
|
||||
RELEASE(h);
|
||||
[e raise];
|
||||
}
|
||||
}
|
||||
}
|
||||
RELEASE(h);
|
||||
|
|
Loading…
Reference in a new issue