Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 626 Bytes

compiler-error-c2313.md

File metadata and controls

29 lines (25 loc) · 626 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2313
Compiler Error C2313
11/04/2016
C2313
C2313
f70eb19b-c0a3-4fb2-ade1-3890a589928d

Compiler Error C2313

'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
}