Compartir a través de


Error del compilador C2311

'excepción': ha sido detectada por '...' en la línea número

El controlador catch de los puntos suspensivos (...) debe ser el último controlador para una instrucción throw.

El ejemplo siguiente genera el error C2311:

// C2311.cpp
// compile with: /EHsc
#include <eh.h>
int main() {
   try {
      throw "ooops!";
   }
   catch( ... ) {}
   catch( int ) {}   // C2311  ellipsis handler not last catch
}