Muokkaa

Jaa


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
}