//异常抛出1
NSException *exception = [NSException exceptionWithName:@"牛逼的错误" reason:@"没有设置frame值" userInfo:nil];
@throw exception;//抛出异常
//直接抛出异常
[NSException raise:@"牛逼的错误" format:@"%@方法找不到哦",NSStringFromSelector(@selector(test))];
//断言
NSAssert(event == @"点击事件", @"不是点击事件");//event == @"点击事件" 返回NO时就会程序崩掉。