This piece of code:
__try
{
}
__except(GetErrorCode())
{
}
You can capture a null pointer, but the code that surrounds it cannot have an object with its own destructor. The AUTO_PTR keyword inside the C + + 11 Standard, the exception that occurs when a pointer to this keyword can be
try
{
}
catch(...)
{
}
Capture, but the VC does not support the AUTO_PTR keyword.
From official Microsoft documents, it is customary for Microsoft to use Goto to add a cleanup scalar after return at the end of the function, and jump to cleanup once the code detects an exception. The code behind the cleanup code is typically used to free memory. Otherwise all normal, normal execution to cleanup before. If the normal code and the exception code share the CLEAUP scalar code, the return code is not written before Cleaup.
The difference between exception handling in C + + 11 GB Standard and Microsoft's exception handling in Visual Studio 2012