Turn: implementation principle of try/catch
1. Try/catch of VC ++ is implemented based on Win32 Seh.
2. Try/catch can only catch exceptions of the current thread. Each thread has its own exception handling entry.
3. The exception handling portal is called by the OS when an exception occurs.
4. To use Seh, the VC ++ compiler automatically generates a lot of code.
Classic seh article on msdn
A crash course on the depths of Win32 structured exception handling
Http://www.microsoft.com/msj/0197/exception/exception.aspx
In-depth exploration of Win32 structured exception handling
Http://blog.csdn.net/diamont/archive/2009/06/11/4259590.aspx
Simulation Implementation on codeproject
How a C ++ compiler implements Exception Handling
CLR implementation
The exception Model
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/optman/archive/2008/06/03/2508323.aspx