mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
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:
parent
6420905d02
commit
47f6403bc6
2 changed files with 13 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
|||
2007-05-15 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSException.m: Permit some recursion in handling uncaught
|
||||
exceptions so that different exception handlers can be tried ...
|
||||
in particular, so that the gui library exception handler can
|
||||
fall back to using the base library handler and get a printout of
|
||||
the exception details when the program terminates.
|
||||
|
||||
2007-05-15 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSURLConnection.m: Minor simplifications.
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue