Partilhar via


Erro do compilador C2317

O bloco 'try' que começa na linha 'number' não tem manipuladores de capturas

Observações

Um try bloco deve ter pelo menos um manipulador de capturas.

Example

O exemplo a seguir gera C2317:

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

Resolução possível:

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