MPQRError

@interface MPQRError : NSError

MPQRError will be thrown if there are any error during parsing or generating QRCode

  • MPQRError have property errorType, the errorType type is the MPQRErrorCode enum

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPQRErrorCode errorType;

    Swift

    var errorType: __MPQRErrorCode { get set }
  • Static method that return a MPQR Object given error type, message or description, tag(s), and tag value.

    Declaration

    Objective-C

    + (id _Nonnull)errorWithType:(MPQRErrorCode)type
                             str:(NSString *_Nullable)str
                             tag:(TagInfo *_Nullable)tag
                            tags:(NSArray<TagInfo *> *_Nullable)tags
                           value:(NSString *_Nullable)value;

    Swift

    class func error(withType type: __MPQRErrorCode, str: String?, tag: TagInfo?, tags: [TagInfo]?, value: String?) -> Any
  • Static method that return a MPQR Object given error type, message or description, tag(s), and tag value, and RootTag.

    Declaration

    Objective-C

    + (id _Nonnull)errorWithType:(MPQRErrorCode)type
                             str:(NSString *_Nullable)str
                             tag:(TagInfo *_Nullable)tag
                            tags:(NSArray<TagInfo *> *_Nullable)tags
                           value:(NSString *_Nullable)value
                         rootTag:(NSString *_Nullable)rootTag;

    Swift

    class func error(withType type: __MPQRErrorCode, str: String?, tag: TagInfo?, tags: [TagInfo]?, value: String?, rootTag: String?) -> Any
  • Return tag information of the error.

    Declaration

    Objective-C

    - (TagInfo *_Nullable)getTag;

    Swift

    func getTag() -> TagInfo?
  • Return string description of the error.

    Declaration

    Objective-C

    - (NSString *_Nullable)getString;

    Swift

    func getString() -> String?
  • Return a list of tags of the error.

    Declaration

    Objective-C

    - (NSArray<TagInfo *> *_Nullable)getTags;

    Swift

    func getTags() -> [TagInfo]?
  • Return the value of the error.

    Declaration

    Objective-C

    - (NSString *_Nullable)getValue;

    Swift

    func getValue() -> String?
  • Return string root-tag of the error.

    Declaration

    Objective-C

    - (NSString *_Nullable)getRootTag;

    Swift

    func getRootTag() -> String?