Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
__finally/finally sans try correspondant
Remarques
Une instruction __finally ou finally sans trycorrespondant a été trouvée. Pour résoudre ce problème, supprimez l’instruction __finally ou ajoutez une instruction try pour __finally.
Example
L’exemple suivant génère l’erreur C3274 :
// C3274.cpp
// compile with: /clr
// C3274 expected
using namespace System;
int main() {
try {
try {
throw gcnew ApplicationException();
}
catch(...) {
Console::Error->WriteLine(L"Caught an exception");
}
finally {
Console::WriteLine(L"In finally");
}
} finally {
Console::WriteLine(L"In finally");
}
// Uncomment the following 3 lines to resolve.
// try {
// throw gcnew ApplicationException();
// }
finally {
Console::WriteLine(L"In finally");
}
Console::WriteLine(L"**FAIL**");
}