共用方式為


TRY

Sets up a TRY block.

TRY

Remarks

A TRY block identifies a block of code that might throw exceptions. Those exceptions are handled in the following CATCH and AND_CATCH blocks. Recursion is allowed: exceptions may be passed to an outer TRY block, either by ignoring them or by using the THROW_LAST macro. End the TRY block with an END_CATCH or END_CATCH_ALL macro.

For more information, see the article Exceptions.

Example

See the example for CATCH.

Requirements

Header: afx.h

See Also

Reference

CATCH

AND_CATCH

END_CATCH

CATCH_ALL

AND_CATCH_ALL

END_CATCH_ALL

THROW (MFC)

THROW_LAST

Concepts

MFC Macros and Globals