try/catch unreachable code C2407 migrating from vs 6.0 to vs 7.1 .NET

From: michael (mbiagioni_at_cox.net)
Date: 07/01/04


Date: 1 Jul 2004 04:29:00 -0700

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);
}

mbiagion@travelers.com



Relevant Pages

  • try/catch unreachable code C2407 migrating from vs 6.0 to vs 7.1 .NET
    ... I am migrating C++ unmanaged to managed VC 7.1. ... The compile tells ... prefix "public _gc class CAccountExposure: ... statements that automate excel ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Compile java sources inside J2EE component
    ... > to compile them at runtime, is there a possibility to do so? ... classloader (the standard URLClassLoader, or whatever it's called, should work ... so there's no interference with any defunct classes that might still be ... One thing that isn't helped by classloaders is migrating the state of the ...
    (comp.lang.java.programmer)
  • f2c.. what happened?
    ... I'm migrating to red hat and I noticed that there is no f2c in version 9 ... I need it to compile some programs.. ... -- redhat-list mailing list unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
    (RedHat)
  • std::_MAX Replacement
    ... I'm migrating from VS6.0 to VS 2003 .Net. ... One of the breaking changes is that _MAX has been redefined so that ... but that won't compile either. ... Prev by Date: ...
    (microsoft.public.vc.language)