Compiler Error C2312
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C2312.
exception1' : is caught by 'exception2' on line number
Two handlers catch the same exception type.
The following sample generates C2312:
// C2312.cpp
// compile with: /EHsc
#include <eh.h>
int main() {
try {
throw "ooops!";
}
catch( signed int ) {}
catch( int ) {} // C2312
}
Show: