From bb4c52dfff8306b7a9108a756fabfb1f73e65c1a Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Tue, 3 Jan 2012 09:34:10 +0000 Subject: [PATCH] * Source/NSException.m (-raise): Only set the stack when the exception gets first raised. This fixes bug #35192 Patch by Larry Campbell git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34398 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSException.m | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9d5a3e2db..f8e87dfaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-01-03 Fred Kiefer + + * Source/NSException.m (-raise): Only set the stack when the + exception gets first raised. This fixes bug #35192 + Patch by Larry Campbell + 2012-01-02 22:26-EST Gregory John Casamento * Headers/Foundation/NSXMLElement.h: Change _attributes to be diff --git a/Source/NSException.m b/Source/NSException.m index bc3e306ef..c7b56b82a 100644 --- a/Source/NSException.m +++ b/Source/NSException.m @@ -957,7 +957,11 @@ callUncaughtHandler(id value) { _reserved = NSZoneCalloc([self zone], 2, sizeof(id)); } - _e_stack = [GSStackTrace new]; + if (nil == _e_stack) + { + // Only set the stack when first raised + _e_stack = [GSStackTrace new]; + } #if defined(_NATIVE_OBJC_EXCEPTIONS) @throw self;