API  1.0.0
CPError Class Reference

Used for encapsulating, presenting, and recovery from errors. More...

#import <CPError.h>

+ Inheritance diagram for CPError:

Instance Methods

(CPInteger) - code
 
(CPString- description
 
(CPString- domain
 
(void) - encodeWithCoder:
 
(id) - initWithCoder:
 
(id) - initWithDomain:code:userInfo:
 
(CPString- localizedDescription
 
(CPString- localizedFailureReason
 
(CPArray) - localizedRecoveryOptions
 
(CPString- localizedRecoverySuggestion
 
(id) - recoveryAttempter
 
(CPString- userInfo
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(id) - init
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(id) + alloc
 
(id) + errorWithDomain:code:userInfo:
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

Used for encapsulating, presenting, and recovery from errors.

CPError is toll-free bridged with CFError() methods.

An example of initializing a CPError:

var userInfo =CPLocalizedDescriptionKey: "A localized error description",
                 CPLocalizedFailureReasonErrorKey: @"A localized failure reason",
                 CPUnderlyingErrorKey: @"An underlying error message"},
    err = [CPError errorWithDomain:CPCappuccinoErrorDomain code:-10 userInfo:userInfo];

Definition at line 2 of file CPError.h.

Method Documentation

◆ alloc()

+ (id) alloc
implementation

Allocates a new instance of the receiving class

Reimplemented from CPObject.

Definition at line 61 of file CPError.j.

◆ code()

- (CPInteger) code
implementation

Definition at line 82 of file CPError.j.

◆ description()

- (CPString) description
implementation

Returns a human readable string describing the receiver

Reimplemented from CPObject.

Definition at line 133 of file CPError.j.

◆ domain()

- (CPString) domain
implementation

Definition at line 92 of file CPError.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Provided by category CPError(CPCoding).

Definition at line 157 of file CPError.j.

◆ errorWithDomain:code:userInfo:()

+ (id) errorWithDomain: (CPString aDomain
code: (CPInteger)  aCode
userInfo: (CPDictionary aDict 
implementation

Definition at line 70 of file CPError.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder
implementation

Provided by category CPError(CPCoding).

Definition at line 146 of file CPError.j.

◆ initWithDomain:code:userInfo:()

- (id) initWithDomain: (CPString aDomain
code: (CPInteger)  aCode
userInfo: (CPDictionary aDict 
implementation

Definition at line 75 of file CPError.j.

◆ localizedDescription()

- (CPString) localizedDescription
implementation

By default this method returns the object in the user info dictionary for the key CPLocalizedDescriptionKey. If the user info dictionary doesn’t contain a value for CPLocalizedDescriptionKey, a default string is constructed from the domain and code.

Definition at line 102 of file CPError.j.

◆ localizedFailureReason()

- (CPString) localizedFailureReason
implementation

Definition at line 107 of file CPError.j.

◆ localizedRecoveryOptions()

- (CPArray) localizedRecoveryOptions
implementation

Definition at line 112 of file CPError.j.

◆ localizedRecoverySuggestion()

- (CPString) localizedRecoverySuggestion
implementation

Definition at line 120 of file CPError.j.

◆ recoveryAttempter()

- (id) recoveryAttempter
implementation

Definition at line 125 of file CPError.j.

◆ userInfo()

- (CPString) userInfo
implementation

Definition at line 87 of file CPError.j.


The documentation for this class was generated from the following files: