discuss-gnustep
[Top][All Lists]
Advanced

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

Re: exception handler


From: Andrew Sveikauskas
Subject: Re: exception handler
Date: Thu, 09 Mar 2006 19:03:45 -0500

Hi folks,

it sure would be nice if the default panel that pops up to signal an
unhandled exception had a button to generate a segmentation fault at the
line where the exception WAS RAISED.

Is this possible? Wouldn't this mean that the panel would have to be implemented in NSException-raise as opposed to creating it as an exception handler? Currently, by the time the panel is created, the previous stack position is lost, correct?

What I do when I get a wild exception and have no idea where it's coming from, I just add a category:

@implementation NSException (TemporaryDebugHack)
- (void)raise
{
    // Whatever you want here...
    // sometimes I put asm("int3") here, because on 386
    // that causes a breakpoint in gdb.
}
@end

Obviously this is not advisible in production code.  :-)

Best regards,

Marko

+-------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, markoriedelde@yahoo.de |
| http://www.geocities.com/markoriedelde/index.html           |
+-------------------------------------------------------------+





reply via email to

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