编译器错误 C2706

非法 __except,没有匹配的 __try__try 块中缺少“}”?)

编译器找不到 __try 块的右大括号。

以下示例生成 C2706:

// C2706.cpp
int main() {
   __try {
      void f();
   // C2706  } missing here
   __except(GetExceptionCode() == 0x0) {
   }
}