Compiler Error C2310
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Compiler Error C2310

catch handlers must specify one type

A catch handler specified no type or multiple types.

The following sample generates C2310:

// C2310.cpp
// compile with: /EHsc
#include <eh.h>
int main() {
   try {
      throw "Out of memory!";
   catch( int ,int) {}   // C2310 two types
   // try the following line instead
   // catch( int)  {}
© 2016 Microsoft