NSArray *arys = @[@"", @"", @""];
NSLog(@"===121212=====> %@", arys[4]);
二哈喝酸奶.gif正常会闪退崩溃掉对吧
开始
pod 'JJException'
#import <JJException.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[JJException configExceptionCategory:JJExceptionGuardAll];
[JJException startGuardException];
}
如果需要记录日志,只需要实现JJExceptionHandle协议,并注册:
@interface ViewController ()<JJExceptionHandle>
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
[JJException registerExceptionHandle:self];
}
- (void)handleCrashException:(NSString*)exceptionMessage exceptionCategory:(JJExceptionGuardCategory)exceptionCategory extraInfo:(nullable NSDictionary*)info{
}
👍🏻JJException👍🏻
网友评论