Re: Making failed NSAsserts crash an app

2009-08-28 Thread Kyle Sluder
On Aug 27, 2009, at 10:27 PM, Joar Wingfors wrote: Terminology aside, I think that he accurately describes how the Cocoa provided assertion macros are implemented and used in general. These macros allow the developer to describe things that always must be true, and ensures that a failure p

Re: Making failed NSAsserts crash an app

2009-08-27 Thread Joar Wingfors
Hello Kyle, I would beg to differ: On 27 aug 2009, at 13.23, Kyle Sluder wrote: Strictly speaking I believe you're more accurately describing an invariant than an assertion. Terminology aside, I think that he accurately describes how the Cocoa provided assertion macros are implemented and

Re: Making failed NSAsserts crash an app

2009-08-27 Thread Keith Duncan
They do not, check that, should not become less true just because your app is built release vs debug. Strictly speaking I believe you're more accurately describing an invariant than an assertion. Not all error states are fatal states. Assert happens when entering an error state, and is left

Re: Making failed NSAsserts crash an app

2009-08-27 Thread Kyle Sluder
On Thu, Aug 27, 2009 at 12:29 PM, Ed Wynne wrote: > 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 rel

Re: Making failed NSAsserts crash an app

2009-08-27 Thread Ed Wynne
On Aug 27, 2009, at 3:12 PM, Kyle Sluder wrote: On Thu, Aug 27, 2009 at 9:46 AM, Squ Aire 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

Re: Making failed NSAsserts crash an app

2009-08-27 Thread Kyle Sluder
On Thu, Aug 27, 2009 at 9:46 AM, Squ Aire 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 optim

RE: Making failed NSAsserts crash an app

2009-08-27 Thread Squ Aire
Thank you both for the info so far. 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? How do people normally do it? Do they just make a crash repor

Re: Making failed NSAsserts crash an app

2009-08-26 Thread Graham Cox
On 27/08/2009, at 10:00 AM, Rob Keniger wrote: 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. The NSAss

Re: Making failed NSAsserts crash an app

2009-08-26 Thread Rob Keniger
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

Making failed NSAsserts crash an app

2009-08-26 Thread Squ Aire
I am planning on using one of the nice crash reporter code/frameworks that are available on the internet that allow me to do stuff that I have seen in many Mac apps. Namely, to allow the user to more easily send me a crash log (plus some user comments on what the user was doing when the app cra