On 20 Feb 2009, at 21:22, sylvain wrote:

Hi,

the program below does not work as I would have expected on my system.

#include <Foundation/Foundation.h>
void MyEHandler(NSException* exception)
{
 NSLog(@"exception: %...@\n",exception);
}
int
main(int argc, const char *argv[])
{
 id pool = [[NSAutoreleasePool alloc] init];
 NSSetUncaughtExceptionHandler(MyEHandler);
 /* compare function address, is ok */
 NSLog(@"MyEHandler: %p\n",MyEHandler);
 NSLog(@"MyEHandler: %p\n",NSGetUncaughtExceptionHandler());
 [NSException raise:@"crash" format:@"no reason"];
 [pool release];
 return 0;
}

$ ./obj/brokenexception
2009-02-20 22:11:14.668 brokenexception[15643] MyEHandler: 0x8048804
2009-02-20 22:11:14.984 brokenexception[15643] MyEHandler: 0x8048804
Abandon

I have installed GNUStep on Ubuntu. Package version: 7.2

Is it a problem with me, the Ubuntu build or upstream?

The output on my system (svn trunk) is

2009-02-20 23:13:36.743 generictests[12218,986ade8] MyEHandler: 0x80487d4 2009-02-20 23:13:36.762 generictests[12218,986ade8] MyEHandler: 0x80487d4 2009-02-20 23:13:36.777 generictests[12218,986ade8] exception: <NSException: 0x98f9060> NAME:crash REASON:no reason INFO:(nil)
obj/generictests: Uncaught exception crash, reason: no reason
Aborted




_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to