Re: Making failed NSAsserts crash an app
Re: Making failed NSAsserts crash an app
- Subject: Re: Making failed NSAsserts crash an app
- From: Kyle Sluder <email@hidden>
- Date: Thu, 27 Aug 2009 12:12:18 -0700
On Thu, Aug 27, 2009 at 9:46 AM, Squ Aire<email@hidden> wrote:
> However, do you have any idea how to accomplish what I actually want to do? Is my original idea of forcing asserts to crash maybe bad, which is why noone even thought of suggesting a way to do it?
It's a bad idea. Assertions should be optimized out of your release build.
Making assertions visible crashes to your users discourages you from
writing assertions and discourages users who have to deal with
crashes. If they are debug-only issues, you can safely write tons of
assertions and only deal with those that have user-visible effects.
This is what we do with OBASSERT and friends (in OmniBase.framework,
part of the OmniSource library found at
http://www.omnigroup.com/developer/ ).
--Kyle Sluder
_______________________________________________
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