Teilen über


Compilerfehler C2317

Der try-Block ab Zeile „number“ umfasst keine catch-Handler.

Bemerkungen

Ein try -Block muss mindestens einen catch-Handler aufweisen.

Example

Im folgenden Beispiel wird C2317 generiert:

// C2317.cpp
// compile with: /EHsc
#include <eh.h>
int main() {
   try {
      throw "throw an exception";
   }
   // C2317, no catch handler
}

Mögliche Lösung:

// C2317b.cpp
// compile with: /EHsc
#include <eh.h>
int main() {
   try {
      throw "throw an exception";
   }
   catch(char*) {}
}