Re: Crashing on all relevant exceptions
Re: Crashing on all relevant exceptions
- Subject: Re: Crashing on all relevant exceptions
- From: Matt Neuburg <email@hidden>
- Date: Mon, 07 Aug 2006 08:48:33 -0700
- Thread-topic: Crashing on all relevant exceptions
On Sun, 6 Aug 2006 15:31:56 -0700, Aaron Jacobs
<email@hidden> said:
>I've searched on and off for a long time now for a way to do this,
>but have never found a posting or discussion thread that deals with
>it directly and has a solution.
>
>I subscribe to the idea of using assertions in particular and
>exceptions in general to "crash early" (in the words of The Pragmatic
>Programmer). The problem I have is that, as I've gathered, NSApp
>uses its own exception handler when the run loop executes code as a
>result of an event. This handler seems to just log exceptions that
>it catches, instead of brining the program down as I'd like. For
>example, if I put NSAssert(NO, @"Blah.") in a method that is hooked
>up to a button in the interface, I get this when I click the button:
>
>2006-08-06 15:21:27.567 Test App[9111] *** Assertion failure in -
>[TestClass test:], /Users/ajacobs/Desktop/TestClass.m:15
>2006-08-06 15:21:27.568 Test App[9111] Blah.
>
>That's not good enough for me; I'd like the program to crash so that
>if the bug makes it into a production version my users notice and
>send me crash reports. I've messed around with the ExceptionHandling
>framework, but unless I missed something it does not allow you to
>make the application crash on this kind of exception.
>
>Is there any way to disable or preempt this exception handler and any
>other ones Cocoa may use that are contrary to my goal?
This helped me on a similar issue:
<http://www.cocoabuilder.com/archive/message/cocoa/2004/2/10/96562>
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden