Compiler Error C2703
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Error C2703

illegal __leave statement

A __leave statement must be inside a __try block.

The following sample generates C2703:

// C2703.cpp
int main() {
   __leave;   // C2703
   __try {
      // try the following line instead
   __finally {}
© 2015 Microsoft