开发者

How can I leave a message in crashlog when I catch an exception?

I want to leave a message in crashlog when I catch an exception. Do开发者_JAVA技巧es NSLog() work?


write down in catch block. NSLog(@"%@", [e reason]); where e is the object of NSError class.

Edited:- @try { //Your Code } @catch (NSException * e) { NSLog(@"%@", [e reason]); } The above code find out any exception arising between your code. I hope will help you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜