Changes by wacko@power1.snu.ac.kr (Yoo C. Chung). See ChangeLog Jan 20,21

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2203 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1997-03-03 19:51:04 +00:00
parent c07f920c70
commit c5b0cb101c
8 changed files with 113 additions and 38 deletions

View file

@ -21,18 +21,28 @@
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <Foundation/NSException.h>
#include <Foundation/NSDictionary.h>
#include <Foundation/NSString.h>
#include <Foundation/NSThread.h>
@implementation NSAssertionHandler
/* Key for thread dictionary. */
static NSString *dict_key = @"_NSAssertionHandler";
+ (NSAssertionHandler *)currentHandler
{
// FIXME: current handler should come from current thread dictionary;
static NSAssertionHandler *only_one = nil;
if (!only_one)
only_one = [NSAssertionHandler new];
return only_one;
NSMutableDictionary *dict;
NSAssertionHandler *handler;
dict = [[NSThread currentThread] threadDictionary];
handler = [dict objectForKey: dict_key];
if (handler == nil)
{
handler = [[NSAssertionHandler alloc] init];
[dict setObject: handler forKey: dict_key];
}
return handler;
}
- (void)handleFailureInFunction:(NSString *)functionName