NSError(MIKMIDI)

@interface NSError (MIKMIDI)

Category to ease creation of NSError instances in the MIKMIDI error domain.

  • Creates an NSError instance whose domain is MIKMIDIErrorDomain. If the userInfo dictionary is nil, or does not contain a value for NSLocalizedDescriptionKey, a default description provided by MIKMIDIDefaultLocalizedErrorDescriptionForErrorCode() will be inserted.

    Declaration

    Objective-C

    + (nonnull instancetype)MIKMIDIErrorWithCode:(MIKMIDIErrorCode)code
                                        userInfo:(nullable NSDictionary *)userInfo;

    Swift

    class func mikmidiError(with code: MIKMIDIErrorCode, userInfo: [AnyHashable : Any]? = nil) -> Self

    Parameters

    code

    An error code. Should be one of the values defined for MIKMIDIErrorCode.

    userInfo

    A user info dictionary. Can pass nil.

    Return Value

    An initialized NSError instance whose domain is MIKMIDIErrorDomain.