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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software