Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have a problem: Now Microsoft has changed, and in respect with the C++ Standar

ID: 658523 • Letter: I

Question

I have a problem: Now Microsoft has changed, and in respect with the C++ Standard, and starting from from Visual Studio 2005 now:

Access Violation are not to be catched in catch(...)
However, if one compile with /EHsc or other similar flags under VS2003 and before, then Access Violation are really caught in catch(...). Yes, really.

In my new company, they have protected their whole application accordingly. And now I have a whole application with hundreds, maybe thousands, of catch(...) compiled in VS2003.

Those catch don't put an end to the process. Sometimes they hopefully trace something like "unexpected error in...", but only sometimes.

How can I explain to them it's plain wrong ? That it hides corruptions until a point where it's impossible to tell what is going wrong ?

Explanation / Answer

Don't start a crusade

Crusades have casualties, and the highest casualties are in the front line.

Software ideas change, and so do companies. Not every company is at the leading edge. Some are behind the latest ideas, moving slowly forward. Find out what the internal process for improvement is, and who is involved, and engage with them. That process must exist, even if you don't recognize it now.

In today's economy, companies cannot afford unproductive effort. Making wholesale changes with no guaranteed benefit is unproductive. But fixing bugs is productive.

When a bug is caused by such a catch it should be fixed properly and recorded as an erroneous catch. After a year or so, you (and they) will be able to see if this is the big problem you think it is. And then changing those catch statements might become a priority.

But more likely they'll decide that new software should be built with proper catch statements. After all, if it's not broken don't fix it.

So don't rock the boat. Just do the job you were hired to do, the best you can. Without starting a crusade.