Macro

NS_VALUERETURN

Permits program control to exit from an exception-handling domain with a value of a specified type.

Declaration

#define NS_VALUERETURN(v, t)

Parameters

val

A value to preserve beyond the exception-handling domain.

type

The type of the value specified in val.

Discussion

The NS_VALUERETURN macro returns program control to the caller out of the exception-handling domain—that is, a section of code between the NS_DURING and NS_HANDLER macros that might raise an exception. The specified value (of the specified type) is returned to the caller. The standard return statement does not work as expected in the exception-handling domain.

See Also

Legacy Macros

NS_DURING

Marks the start of the exception-handling domain.

NS_ENDHANDLER

Marks the end of the local event handler.

NS_HANDLER

Marks the end of the exception-handling domain and the start of the local exception handler.

NS_VOIDRETURN

Permits program control to exit from an exception-handling domain.

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