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
This commit is contained in:
Richard Frith-MacDonald 2001-01-08 20:02:09 +00:00
parent eead6b0342
commit c3f5b4a9eb

View file

@ -30,11 +30,17 @@
#include <Foundation/NSThread.h>
#include <Foundation/NSDictionary.h>
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]);