Today I think i might have learned something (not sure), i’m not really a obj-c programmer, more the php & java type, but building a iPhone app together with somebody got me this, so hopefully somebody can help me explain what and why:
I’ve put some code inside a @try {..} and @catch (NSException * e) {..} and my thought was everything would have been caught by that, but the other developer put and assert(false); at the end of the function, after de catch.
Why?
assert(3)is not part of Objective-C itself. It’s part of the C standard. Check out the man page. From the C spec, section 7.2.1.1 Theassertmacro:So
assert(false)will just crash the program at that point.