Re: Making failed NSAsserts crash an app
Re: Making failed NSAsserts crash an app
- Subject: Re: Making failed NSAsserts crash an app
- From: Rob Keniger <email@hidden>
- Date: Thu, 27 Aug 2009 10:00:37 +1000
On 27/08/2009, at 7:49 AM, Squ Aire wrote:
Since I absolutely want some information on whenever my NSAsserts
fail (because they should NEVER fail and I want to know about it if
they do! (at least during beta testing!)), my question is: How can I
guarantee that a failed NSAssert will crash my application? I want
it to happen in such a way that the next time the user loads the
app, the info about the failed NSAssert (perhaps the 2nd description
string argument I supply to it, or even the line of code and code
file) will go along with the crash reports.
You could raise exceptions instead of generating assertion failures.
Exceptions are caught by several of the crash reporting frameworks.
You could probably map the NSAssert macros to exception-generation
code for your beta builds.
--
Rob Keniger
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden