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) {}
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for