From cf3295a00444981d405cc433149e3172c44b09a1 Mon Sep 17 00:00:00 2001 From: rfm Date: Tue, 28 Jul 2009 19:04:40 +0000 Subject: [PATCH] Fix text in exception git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28417 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ Source/NSConnection.m | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b3e55e433..70024e541 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-28 Richard Frith-Macdonald + + * Source/NSConnection.m: Correct the text in exception when attempting + to read a response on an invalidated connection. + * Source/Additions/GSMime.m: + Fixup incorrect declaration of method in wrong class implementation. + 2009-07-27 David Ayers * Source/Additions/GSCompatibility.m ([-boolValue]): Only compile diff --git a/Source/NSConnection.m b/Source/NSConnection.m index a7eb73f68..e327cd8f1 100644 --- a/Source/NSConnection.m +++ b/Source/NSConnection.m @@ -2870,15 +2870,22 @@ static void callEncoder (DOContext *ctxt) NSTimeInterval last_interval = 0.0001; NSTimeInterval delay_interval = last_interval; NSDate *delay_date = nil; - NSRunLoop *runLoop = GSRunLoopForThread(nil); + NSRunLoop *runLoop; BOOL isLocked = NO; + if (_isValid == NO) + { + [NSException raise: NSObjectInaccessibleException + format: @"Connection has been invalidated"]; + } + /* * If we have sent out a request on a run loop that we don't already * know about, it must be on a new thread - so if we have multipleThreads * enabled, we must add the run loop of the new thread so that we can * get the reply in this thread. */ + runLoop = GSRunLoopForThread(nil); if ([_runLoops indexOfObjectIdenticalTo: runLoop] == NSNotFound) { if (_multipleThreads == YES)