[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stack walkbacks and catching unhandled exceptions

From: Richard Frith-Macdonald
Subject: Re: Stack walkbacks and catching unhandled exceptions
Date: Mon, 23 Jun 2008 06:02:53 +0100

On 22 Jun 2008, at 22:07, Vincent Coetzee wrote:

1-2. When I use Objective-C on Mac OS X, the first thing I do when I start developing an Application is to install an UnhandledException handler that gives me a full stack trace when it catches an unhandled exception. I would very much like to do this on Ubuntu using Foundation (GnuStepBase) since everytime NSObject catches a doesNotUnderstandSelector my App aborts and I have to bugger around for 10 minutes with the debugger to find out the selector, class and method. I have tried installing an unhandled exception handler using the ( mostly ) undocumented functions to no avail. All the functions I install never get invoked. Does anyone know how to do this with certainty.

Certainly ... to the best of my knowledge this is exactly the same mechanism in gustep-base as in the Apple Foundation.
This feature has always been present in base.

And secondly I can not find the companion methods in GnuStepBase that I use in Mac OS X Foundation to get a stack trace. Can some assist / suggest ?

Again, to the best of my knowledge the API for stack trace management in base has everything in MacOS-X. However, in base things are actually a lot easier as you can also use the GNUSTEP_STACK_TRACE environment variable: 'When this is set to YES a stack trace is added to the output of the description method of a raised exception object.' Stacktrace reporting was added to base about a year before Apple added stacktrace methods to Foundation, and then adjusted to match Apple's changes in recent releases.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]