Exceptyion handler tweak for gui termination.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25164 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2007-05-15 12:53:33 +00:00
parent a7f86a2a91
commit ae971f5849
2 changed files with 13 additions and 7 deletions

View file

@ -809,16 +809,14 @@ _NSFoundationUncaughtExceptionHandler (NSException *exception)
handler = thread->_exception_handler;
if (handler == NULL)
{
static BOOL recursion = NO;
static int recursion = 0;
/*
* Set a flag to prevent recursive uncaught exceptions.
* Set/check a counter to prevent recursive uncaught exceptions.
* Allow a little recursion in case we have different handlers
* being tried.
*/
if (recursion == NO)
{
recursion = YES;
}
else
if (recursion++ > 3)
{
fprintf(stderr,
"recursion encountered handling uncaught exception\n");