mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
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:
parent
eead6b0342
commit
c3f5b4a9eb
1 changed files with 7 additions and 1 deletions
|
@ -30,11 +30,17 @@
|
||||||
#include <Foundation/NSThread.h>
|
#include <Foundation/NSThread.h>
|
||||||
#include <Foundation/NSDictionary.h>
|
#include <Foundation/NSDictionary.h>
|
||||||
|
|
||||||
|
static void
|
||||||
|
_preventRecursion (NSException *exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_NSFoundationUncaughtExceptionHandler (NSException *exception)
|
_NSFoundationUncaughtExceptionHandler (NSException *exception)
|
||||||
{
|
{
|
||||||
|
_NSUncaughtExceptionHandler = _preventRecursion;
|
||||||
fprintf(stderr, "Uncaught exception %s, reason: %s\n",
|
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:
|
/* FIXME: need to implement this:
|
||||||
NSLogError("Uncaught exception %@, reason: %@",
|
NSLogError("Uncaught exception %@, reason: %@",
|
||||||
[exception name], [exception reason]);
|
[exception name], [exception reason]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue