try { // Do something to throw an exception. } catch(CException* e) { if (m_bPassExceptionsUp) throw; if (m_bThrowDifferentException) { e->Delete(); throw new CMyOtherException; } if (m_bReturnFromThisFunction) { e->Delete(); return; } e->Delete(); }
{
// Do something to throw an exception.
}
catch(CException* e)
{
if (m_bPassExceptionsUp)
throw; if (m_bThrowDifferentException)
{
e->Delete();
throw new CMyOtherException;
} if (m_bReturnFromThisFunction)
{
e->Delete();
return;
} e->Delete();
}
try
{
//代码
}
catch (...)
{
//提示
}