Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 594 Bytes

compiler-error-c2309.md

File metadata and controls

30 lines (26 loc) · 594 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2309
Compiler Error C2309
11/04/2016
C2309
C2309
6303d5b5-72cf-42b8-92ce-b1eb48e80d48

Compiler Error C2309

catch handler expected a parenthesized exception declaration

A catch handler has no parenthesized type.

The following sample generates C2309:

// C2309.cpp
// compile with: /EHsc
#include <eh.h>
class C {};
int main() {
   try {
      throw "ooops!";
   }
   catch C {}   // C2309
   // try the following line instead
   // catch( C ) {}
}