473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

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. 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
Nov 17 '05 #1
0 1185

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tom Anderson | last post by:
Evening all, Here's a brief chat with the interpretator: Python 2.4.1 (#2, Mar 31 2005, 00:05:10) on darwin Type "help", "copyright", "credits" or "license" for more information. >>> def...
1
by: Kepler | last post by:
I have a situation where I need to use a Using statement that creates some records in a database. After that completes, if it completes, I need to do some file creation. Any code I'm putting...
22
by: STom | last post by:
I heard someone mention to me that the use of try catch exception handling is very expensive (in relative terms of slowing an app down) if it is used frequently. Of course they could not explain...
6
by: dfetrow410 | last post by:
Can I do this in an if statement? public string getClass() { counta = counta + 1; if (counta < 2 ) {
1
by: tam | last post by:
when i am using session variable i found one error that unreachable core error. how to rectify this error
3
by: Don Burden | last post by:
We've started converting some applications to the .NET 2.0 framework. When compiling in VS 2005, I'm getting a warning on this line: return (unitWidth != null ) ? unitWidth : new Unit("0px"); ...
8
by: teddysnips | last post by:
I'm new to C# - recent background mainly ASP.NET with VB.NET. Anyhoot, I needed to create a C# statement analogous to VB's IIf: VB.NET Dim e As Boolean e = IIf((CInt(MyVariable) 0), True,...
4
by: EmilyA | last post by:
Hi! I'm not that good at programming, so I was wondering if anyone could tell me why I'm getting an unreachable statement error for lines 18, 35, 68, and 86. import java.util.ArrayList; ...
1
by: HillBilly | last post by:
What does that error mean and why would each break statement be marked as unreachable? It implies the return will --always-- return some --thing-- if even null and no further processing can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.