MapsIndoors iOS SDK  V3
Instance Methods | Class Methods | List of all members
MPJSONModelError Class Reference

#import <MPJSONModelError.h>

Inherits NSError.

Instance Methods

(instancetype) - errorByPrependingKeyPathComponent:
 

Class Methods

(id) + errorInvalidDataWithMessage:
 
(id) + errorInvalidDataWithMissingKeys:
 
(id) + errorInvalidDataWithTypeMismatch:
 
(id) + errorBadResponse
 
(id) + errorBadJSON
 
(id) + errorModelIsInvalid
 
(id) + errorInputIsNil
 

Detailed Description

Custom NSError subclass with shortcut methods for creating the common MPJSONModel errors

Method Documentation

◆ errorBadJSON

+ (id) errorBadJSON

Creates a MPJSONModelError instance with code kMPJSONModelErrorBadJSON = 3

◆ errorBadResponse

+ (id) errorBadResponse

Creates a MPJSONModelError instance with code kMPJSONModelErrorBadResponse = 2

◆ errorByPrependingKeyPathComponent:

- (instancetype) errorByPrependingKeyPathComponent: (NSString *)  component

Creates a new MPJSONModelError with the same values plus information about the key-path of the error. Properties in the new error object are the same as those from the receiver, except that a new key kMPJSONModelKeyPath is added to the userInfo dictionary. This key contains the component string parameter. If the key is already present then the new error object has the component string prepended to the existing value.

◆ errorInputIsNil

+ (id) errorInputIsNil

Creates a MPJSONModelError instance with code kMPJSONModelErrorNilInput = 5

◆ errorInvalidDataWithMessage:

+ (id) errorInvalidDataWithMessage: (NSString *)  message

Creates a MPJSONModelError instance with code kMPJSONModelErrorInvalidData = 1

◆ errorInvalidDataWithMissingKeys:

+ (id) errorInvalidDataWithMissingKeys: (NSSet *)  keys

Creates a MPJSONModelError instance with code kMPJSONModelErrorInvalidData = 1

Parameters
keysa set of field names that were required, but not found in the input

◆ errorInvalidDataWithTypeMismatch:

+ (id) errorInvalidDataWithTypeMismatch: (NSString *)  mismatchDescription

Creates a MPJSONModelError instance with code kMPJSONModelErrorInvalidData = 1

Parameters
mismatchDescriptiondescription of the type mismatch that was encountered.

◆ errorModelIsInvalid

+ (id) errorModelIsInvalid

Creates a MPJSONModelError instance with code kMPJSONModelErrorModelIsInvalid = 4


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