共用方式為


Exception Handling under /clr

You can use both structured exception handling (SEH) and C++ exception handling under /clr. Under /clr, you can also handle CLR exceptions. A CLR exception is any exception thrown by a managed type. The System::Exception class provides many useful methods for processing CLR exceptions and is recommended as a base class for user-defined exception classes.

注意

Catching exception types derived from an interface is not supported under /clr. Also, the common language runtime does not permit you to catch stack overflow exceptions; a stack overflow exception will terminate the process.

In This Section

See Also

Concepts

Language Features for Targeting the CLR