码迷,mamicode.com
首页 > 其他好文 > 详细

Nserror

时间:2017-07-26 01:38:20      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:com   rom   general   app   sel   os x   present   ring   environ   

Every program must deal with errors as they occur at runtime. The program, for example, might not be able to open a file, or perhaps it cannot parse an XML document. Often errors such as these require the program to inform the user about them. And perhaps the program can attempt to get around the problem causing the error.

Cocoa (and Cocoa Touch) offer developers programmatic tools for these tasks: the NSError class in Foundation and new methods and mechanisms in the Application Kit to support error handling in applications. An NSError object encapsulates information specific to an error, including the domain (subsystem) originating the error and the localized strings to present in an error alert. With an application there is also an architecture allowing the various objects in an application to refine the information in an error object and perhaps to recover from the error.

Nserror

标签:com   rom   general   app   sel   os x   present   ring   environ   

原文地址:http://www.cnblogs.com/feng9exe/p/7237195.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!