__finally without matching try
A __finally statement was found without a matching try. To resolve, either delete the __finally statement or add a try statement for the __finally.
The following sample generates C3274:
#using <mscorlib.dll> void main(int argc, char** argv) { try { try { throw new ApplicationException(); } catch(...) { Console::Error->WriteLine(L"Caught an exception"); } __finally { Console::WriteLine(L"In finally"); } } __finally { Console::WriteLine(L"In finally"); } /* try { throw new ApplicationException(); } */ // resolve by commenting out the following __finally // or by uncommenting the previous try __finally { // C3274 Console::WriteLine(L"In finally"); } Console::WriteLine(L"**FAIL**"); }