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.
精彩评论