I am migrating C++ unmanaged to managed VC 7.1. I continue to have
problems with try catch blocks through-out my code. The compile tells
me the the code is unreachable C2407 at the catch portion of the
block. I am using /clr /EHsc switches. The class does not have the
prefix "public _gc class CAccountExposure :
System::Windows::Forms::Form " but "class CAccountExposure : public
CDialog." The following is a snippet of code representing the problem:
try
{
statements that automate excel
}
catch(COleException *e)
{
char buf[500];
sprintf(buf, "COleException. SCode: %60x. ", (long)e->m_sc);
::MessageBox(NULL, buf, "COleException", MB_SETFOREGROUND | MB_OK);
}
mb******@travelers.com