![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/doc/gnustep-base-doc/Base/Reference/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>NSError class documentation</title> </head> <body> <font face="serif"> <a href="Base.html">Up</a> <br /> <h1><a name="title$NSError">NSError class documentation</a></h1> <h3>Authors</h3> <dl> <dt>Richard Frith-Macdonald (<a href="mailto:rfm@gnu.org"><code>rfm@gnu.org</code></a>)</dt> <dd> </dd> </dl> <p><b>Copyright:</b> (C) 2004,2006 Free Software Foundation, Inc.</p> <div> </div> <h1><a name="001000000000"> Software documentation for the NSError class </a></h1> <h2><a name="class$NSError">NSError</a> : <a rel="gsdoc" href="NSObject.html#class$NSObject">NSObject</a></h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>Foundation/NSError.h</dd> </dl> </blockquote> <blockquote> <dl> <dt><b>Conforms to:</b></dt> <dd><a rel="gsdoc" href="NSObject.html#protocol$(NSCopying)">NSCopying</a></dd> <dd><a rel="gsdoc" href="NSObject.html#protocol$(NSCoding)">NSCoding</a></dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> MacOS-X 10.3.0</div> <br /> <div class="desc"> Error information class. <br /> NSError instances are used to pass information about runtime errors from lower levels to higher levels of the program. <br /> These should be used instead of exceptions where an error is caused by external factors (such as a resource file not being present) rather than a programming error (where NSException should be used). </div> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="NSError.html#method$NSError+errorWithDomain$code$userInfo$">+errorWithDomain:code:userInfo:</a></li> <li><a rel="gsdoc" href="NSError.html#method$NSError-code">-code</a></li> <li><a rel="gsdoc" href="NSError.html#method$NSError-domain">-domain</a></li> <li><a rel="gsdoc" href="NSError.html#method$NSError-initWithDomain$code$userInfo$">-initWithDomain:code:userInfo:</a></li> <li><a rel="gsdoc" href="NSError.html#method$NSError-localizedDescription">-localizedDescription</a></li> <li><a rel="gsdoc" href="NSError.html#method$NSError-localizedFailureReason">-localizedFailureReason</a></li> <li><a rel="gsdoc" href="NSError.html#method$NSError-localizedRecoveryOptions">-localizedRecoveryOptions</a></li> <li><a rel="gsdoc" href="NSError.html#method$NSError-localizedRecoverySuggestion">-localizedRecoverySuggestion</a></li> <li><a rel="gsdoc" href="NSError.html#method$NSError-recoveryAttempter">-recoveryAttempter</a></li> <li><a rel="gsdoc" href="NSError.html#method$NSError-userInfo">-userInfo</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$NSError+errorWithDomain$code$userInfo$">errorWithDomain: code: userInfo: </a></h3> + (id) <b>errorWithDomain:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aDomain<b> code:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)aCode<b> userInfo:</b> (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*)aDictionary;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.3.0</div> <br /> <div class="desc"> Creates and returns an autoreleased NSError instance by calling <a rel="gsdoc" href="#method$NSError-initWithDomain$code$userInfo$"> -initWithDomain:code:userInfo: </a> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSError-code">code </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>code</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.3.0</div> <br /> <div class="desc"> Return the error code... which is not globally unique, just unique for a particular domain. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSError-domain">domain </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>domain</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.3.0</div> <br /> <div class="desc"> Return the domain for this instance. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSError-initWithDomain$code$userInfo$">initWithDomain: code: userInfo: </a></h3> - (id) <b>initWithDomain:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aDomain<b> code:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)aCode<b> userInfo:</b> (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*)aDictionary;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.3.0</div> <br /> This is a designated initialiser for the class.<br /> <div class="desc"> Initialises the receiver using the supplied domain, code, and info. <br /> The domain must be non-nil. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSError-localizedDescription">localizedDescription </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>localizedDescription</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.3.0</div> <br /> <div class="desc"> Return a human readable description for the error. <br /> The default implementation uses the value from the user info dictionary if it is available, otherwise it generates a generic one from domain and code. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSError-localizedFailureReason">localizedFailureReason </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>localizedFailureReason</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.4.0</div> <br /> <div class="desc"> Return a human readable explanation of the reason for the error (if known). This should normally be a more discursive explanation then the <strong>short</strong> one provided by the <a rel="gsdoc" href="#method$NSError-localizedDescription"> -localizedDescription </a> method. <br /> The default implementation uses the value from the user info dictionary if it is available, otherwise it returns <code>nil</code> . </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSError-localizedRecoveryOptions">localizedRecoveryOptions </a></h3> - (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>localizedRecoveryOptions</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.4.0</div> <br /> <div class="desc"> Returns an array of strings to be used as titles of buttons in an alert panel when offering the user optionbs to try to recover from the error. <br /> The default implementation uses the value from the user info dictionary if it is available, otherwise it returns <code>nil</code>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSError-localizedRecoverySuggestion">localizedRecoverySuggestion </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>localizedRecoverySuggestion</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.4.0</div> <br /> <div class="desc"> Returns a string used as the secondary text in an alert panel, suggesting how the user might select an option to attempt to recover from the error. <br /> The default implementation uses the value from the user info dictionary if it is available, otherwise it returns <code>nil</code>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSError-recoveryAttempter">recoveryAttempter </a></h3> - (id) <b>recoveryAttempter</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.4.0</div> <br /> <div class="desc"> Not yet useful in GNUstep. <br /> The default implementation uses the value from the user info dictionary if it is available, otherwise it returns <code>nil</code>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSError-userInfo">userInfo </a></h3> - (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*) <b>userInfo</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.3.0</div> <br /> <div class="desc"> Return the user info for this instance (or <code>nil</code> if none is set) <br /> The <code>NSLocalizedDescriptionKey</code> should locate a human readable description in the dictionary. <br /> The <code>NSUnderlyingErrorKey</code> key should locate an <code>NSError</code> instance if an error is available describing any underlying problem. <br /> </div> <hr width="25%" align="left" /> </div> <br /> <a href="Base.html">Up</a> </font> </body> </html>