This documentation is archived and is not being maintained.

Compiler Error C2184

Error Message

'type' : illegal type for __except expression, must be an integral

A type was used in an __except statement, but the type is not allowed.

The following sample generates C2184:

// C2184.cpp
void f() {
   int * p;
   __try{}
   __except(p){};   // C2184
}

Possible resolution:

// C2184b.cpp
// compile with: /c
void f() {
   int i = 0;
   __try{}
   __except(i){};
}
Show: