description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|
Learn more about: Compiler Error C2313 |
Compiler Error C2313 |
11/04/2016 |
|
|
f70eb19b-c0a3-4fb2-ade1-3890a589928d |
'type1' : is caught by reference ('type2') on line number
The exception type has two handlers. The type for the second catch is a reference to the type of the first.
The following sample generates C2313:
// C2313.cpp
// compile with: /EHsc
#include <eh.h>
class C {};
int main() {
try {
throw "ooops!";
}
catch( C& ) {}
catch( C ) {} // C2313
}