• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Making failed NSAsserts crash an app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making failed NSAsserts crash an app


  • Subject: Re: Making failed NSAsserts crash an app
  • From: Ed Wynne <email@hidden>
  • Date: Thu, 27 Aug 2009 15:29:15 -0400


On Aug 27, 2009, at 3:12 PM, Kyle Sluder wrote:
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.

<IMHO>

This attitude is, at best, a perversion of the very definition of an assertion. Assertions are things that must be true, that is why they are assertions. They do not, check that, should not become less true just because your app is built release vs debug.

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.

If you are using assertions to test for things that are handleable situations or recoverable errors, you are doing it wrong. Checking is good, but its just that, checking... not asserting.


Developers should definitely do both, not overload checks into some type of cuckolded assertion.

</IMHO>

-Ed

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: Making failed NSAsserts crash an app
      • From: Kyle Sluder <email@hidden>
References: 
 >Making failed NSAsserts crash an app (From: Squ Aire <email@hidden>)
 >Re: Making failed NSAsserts crash an app (From: Rob Keniger <email@hidden>)
 >Re: Making failed NSAsserts crash an app (From: Graham Cox <email@hidden>)
 >RE: Making failed NSAsserts crash an app (From: Squ Aire <email@hidden>)
 >Re: Making failed NSAsserts crash an app (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Starting editing for a Row as soon as it is Added.
  • Next by Date: Fwd: Reasons why QL would fail to create thumbnail?
  • Previous by thread: Re: Making failed NSAsserts crash an app
  • Next by thread: Re: Making failed NSAsserts crash an app
  • Index(es):
    • Date
    • Thread