Declared in NSError+SPiDError.h
NSError+SPiDError.m

Overview

Adds helper methods to NSError for more organized code.

Tasks

Class Methods

apiErrorWithCode:description:reason:

Creates a new NSError with SPiD API domain and the given paramters

+ (NSError *)apiErrorWithCode:(NSInteger)code description:(NSString *)description reason:(NSString *)reason

Parameters

code

Error code.

description

Error description.

reason

Error reason.

Return Value

Returns NSError with the given data.

Discussion

Warning: Not implemented yet

Declared In

NSError+SPiDError.h

errorFromJSONData:

Creates a new NSError with SPiD OAuth2 domain and given dictionary.

+ (NSError *)errorFromJSONData:(NSDictionary *)dictionary

Parameters

dictionary

Dictionary containing error data received from SPiD

Return Value

Returns NSError with the given data.

Declared In

NSError+SPiDError.h

getSPiDOAuth2ErrorCode:

+ (NSInteger)getSPiDOAuth2ErrorCode:(NSString *)errorString

oauth2ErrorWithCode:description:reason:

Creates a new NSError with SPiD OAuth2 domain and the given paramters

+ (NSError *)oauth2ErrorWithCode:(NSInteger)code description:(NSString *)description reason:(NSString *)reason

Parameters

code

Error code.

description

Error description.

reason

Error reason.

Return Value

Returns NSError with the given data.

Declared In

NSError+SPiDError.h

oauth2ErrorWithString:

Creates a new NSError with SPiD OAuth2 domain and the given string.

+ (NSError *)oauth2ErrorWithString:(NSString *)errorString

Parameters

errorString

Error received from SPiD.

Return Value

Returns NSError with the given data.

Declared In

NSError+SPiDError.h