• 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: 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


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

  • Prev by Date: How to Convert "#FF00FF" String Specifying RGB Color to 32 bit int
  • Next by Date: NSOperation: Selector being called before process finished
  • Previous by thread: Making failed NSAsserts crash an app
  • Next by thread: Re: Making failed NSAsserts crash an app
  • Index(es):
    • Date
    • Thread