How can I use NSError in my iPhone App?

后端 未结 9 1098
Happy的楠姐
Happy的楠姐 2020-12-07 06:32

I am working on catching errors in my app, and I am looking into using NSError. I am slightly confused about how to use it, and how to populate it.

9条回答
  •  旧巷少年郎
    2020-12-07 07:07

    Well it's a little bit out of question scope but in case you don't have an option for NSError you can always display the Low level error:

     NSLog(@"Error = %@ ",[NSString stringWithUTF8String:strerror(errno)]);
    

提交回复
热议问题