iOS 断言

NSAssert
定义:#define NSAssert(condition, desc, ...) //第一个参数bool值,如果为真就跳过,假就抛出异常,

2017-03-28 11:09:35.620 test[53230:6340827] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'str is nil'

'str is nil'即为desc

参考文章

你可能感兴趣的:(iOS 断言)