This documentation is archived and is not being maintained.

Compiler Error C2310

Error Message

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)  {}