Compartir a través de


Error del compilador C2317

El bloque 'try' que empieza en la línea 'número' no tiene controladores de tipo catch

Observaciones

Un bloque try debe tener al menos un controlador catch.

Example

En el siguiente ejemplo se genera el error C2317:

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

Posible solución:

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