Compiler Error C2310


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at 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)  {}