NSError(ZumoKit)

@interface NSError (ZumoKit)

NSError extension with error type and error code and message. Refer to Handling Errors guide for details on handling errors.

  • Creates an NSError object extended with error type and error code.

    Declaration

    Objective-C

    + (nonnull NSError *)
        errorFromZumoKitException:(nullable NSString *)zumoKitErrorType
                             code:(nullable NSString *)zumoKitErrorCode
                          message:(nullable NSString *)message;

    Swift

    /*not inherited*/ init(fromZumoKitException zumoKitErrorType: String?, code zumoKitErrorCode: String?, message: String?)

    Parameters

    zumoKitErrorType

    ZumoKit error type

    zumoKitErrorCode

    ZumoKit error code

    message

    error message

    Return Value

    an NSError object with the error information

  • Creates an exception with the name “NSError”, setting the reason to the debugDescription. The Error instance is added to the UserInfo dictionary under the key “NSError”.

    Declaration

    Objective-C

    - (void)throw;

    Swift

    func `throw`()