From c3f5b4a9ebfbf022af479ab21c0ad4db78a5445b Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Mon, 8 Jan 2001 20:02:09 +0000 Subject: [PATCH] Prevent recursion in default exception handler. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8520 72102866-910b-0410-8b05-ffd578937521 --- Source/NSException.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/NSException.m b/Source/NSException.m index a2528e10e..4accc945c 100644 --- a/Source/NSException.m +++ b/Source/NSException.m @@ -30,11 +30,17 @@ #include #include +static void +_preventRecursion (NSException *exception) +{ +} + static void _NSFoundationUncaughtExceptionHandler (NSException *exception) { + _NSUncaughtExceptionHandler = _preventRecursion; fprintf(stderr, "Uncaught exception %s, reason: %s\n", - [[exception name] cString], [[exception reason] cString]); + [[exception name] lossyCString], [[exception reason] lossyCString]); /* FIXME: need to implement this: NSLogError("Uncaught exception %@, reason: %@", [exception name], [exception reason]);