[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exception handler
From: |
Marko Riedel |
Subject: |
Re: exception handler |
Date: |
Fri, 10 Mar 2006 01:26:22 +0100 (CET) |
--- Andrew Sveikauskas <asveikau@mail.rochester.edu> schrieb:
> > 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. :-)
>
That's exactly what I was looking for. Cool!
Marko
+-------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, markoriedelde@yahoo.de |
| http://www.geocities.com/markoriedelde/index.html |
+-------------------------------------------------------------+
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de