Compiler Error C2703
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at 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
__leave;
}
__finally {}
}
Show: