c++ 的未处理的 exeception catch 块

Unhandeled exeception catch block of c++

本文关键字:catch 未处理 c++ exeception      更新时间:2023-10-16
try{
    throw ;
}
catch(CException *pEx){
   CString sample=(_T("IIII")); //   Why cant i initialize CString variable?
//Unhandeled exception during run time  When i am throw,
}

throw;重新引发当前处理的异常。仅当当前正在处理异常时,才允许使用此表单(如果以其他方式使用,则调用std::terminate)。亲自查看 http://en.cppreference.com/w/cpp/language/throw。

因此,基本上,您的程序在 throw ; .