Up
Authors
- Richard Frith-Macdonald (
rfm@gnu.org
)
-
Copyright: (C) 2004 Free Software Foundation, Inc.
- Declared in:
- Foundation/NSError.h
- Conforms to:
- NSCopying
- NSCoding
Availability: MacOS-X 10.0.0
Error information class.
Method summary
+ (id)
errorWithDomain: (
NSString*)aDomain
code: (int)aCode
userInfo: (
NSDictionary*)aDictionary;
Availability: MacOS-X 10.0.0
- (int)
code;
Availability: MacOS-X 10.0.0
Return the error code... which is not globally unique, just unique for a particular domain.
- (
NSString*)
domain;
Availability: MacOS-X 10.0.0
Return the domain for this instance.
- (id)
initWithDomain: (
NSString*)aDomain
code: (int)aCode
userInfo: (
NSDictionary*)aDictionary;
Availability: MacOS-X 10.0.0
This is a designated initialiser for the class.
Initialises the receiver using the supplied domain, code, and info.
The domain must be non-nil.
- (
NSString*)
localizedDescription;
Availability: MacOS-X 10.0.0
Subclasses
should override this method.
Return a human readable description for the error.
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.
- (
NSDictionary*)
userInfo;
Availability: MacOS-X 10.0.0
Return the user info for this instance (or nil
if none is set)
The NSLocalizedDescriptionKey
should locate a human readable description in the dictionary.
The NSUnderlyingErrorKey
key should locate an NSError
instance if an error is available describing any underlying problem.
Up