Type Method

exceptionWithName:reason:userInfo:

Creates and returns an exception object .

Declaration

+ (NSException *)exceptionWithName:(NSExceptionName)name reason:(NSString *)reason userInfo:(NSDictionary *)userInfo;

Parameters

name

The name of the exception.

reason

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

userInfo

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.

See Also

Creating and Raising an NSException Object

+ raise:format:

A convenience method that creates and raises an exception.

+ raise:format:arguments:

Creates and raises an exception with the specified name, reason, and arguments.

- initWithName:reason:userInfo:

Initializes and returns a newly allocated exception object.

- raise

Raises the receiver, causing program flow to jump to the local exception handler.