Delen via


Compilerfout C2317

'try' block starten op regel 'number' heeft geen catch handlers

Opmerkingen

Een try blok moet ten minste één catch handler hebben.

Example

In het volgende voorbeeld wordt C2317 gegenereerd:

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

Mogelijke oplossing:

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