This documentation is archived and is not being maintained.

Compiler Error C2703

illegal __leave statement

A __leave statement must be inside a __try block.

Example

// C2703.cpp
int main()
{
   __leave;   // C2703
   __try
   {
      __leave;   //OK
   }
   __finally {}
}
Show: