Contents

init(name:reason:userInfo:)

Initializes and returns a newly allocated exception object.

Declaration

init(name aName: NSExceptionName, reason aReason: String?, userInfo aUserInfo: [AnyHashable : Any]? = nil)

Parameters

  • aName:

    The name of the exception.

  • aReason:

    A human-readable message string summarizing the reason for the exception.

  • aUserInfo:

    A dictionary containing user-defined information relating to the exception

Return Value

The created NSException object or nil if the object couldn’t be created.

Discussion

This is the designated initializer.

See Also

Creating and Raising an NSException Object