Partager via


Erreur du compilateur C2319

'try/catch' doit être suivi(e) d’une instruction composée. Accolade '{' manquante

Un bloc try ou catch est introuvable après l’instruction try ou catch . Le bloc doit être entre accolades.

L’exemple suivant génère l’erreur C2319 :

// C2319.cpp
// compile with: /EHsc
#include <eh.h>
class C {};
int main() {
   try {
      throw "ooops!";
   }
   catch( C ) ;    // C2319
   // try the following line instead
   // catch( C ) {}
}