编译器错误 C2310

catch 处理程序必须指定一种类型

catch 处理程序未指定任何类型或指定了多种类型。

以下示例生成 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)  {}
}