I have explained the functional differences in this thread or one of the many others you have created on the topic. If you can't remember, then go back and re-read.
I think I've also been quite explicit on which you should use. Which part of "I believe that SEH should not be used in C++ at all, except for some very, very specific use cases." is vague?
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
I guess you can't find it because in the last few weeks you have started at least four threads about exception handling - but if you go to your profile [click on your name in one of the recent posts], you can "find all threads started by george2", you can see all those threads.
Or you can find all the posts by CornedBee - but there may be more of those.
Failing that, perhaps the Search option, where you can select all sorts of things to search for, will help you.
Also, when it comes to maintaining "old" code, you only make changes when and if there is a need to - so you shouldn't have to worry about changing between try/catch or __try/__except in most cases.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Since you're maintaining an existing application, our point is to minimize change. Is the error something you're supposed to correct, or did it appear after you changed something? If it's the latter, try to do the original change differently.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
Right, when changing an existing application, the first question you need to answer is "Why am I changing this?" - if the answer is "It fixes the reported problem", then go ahead and change it. If the answer isn't that, then you PROBABLY shouldn't be changing it.
The rule when changing existing code is "change it as little as possible".
Of course, if the subject of your change is "C++ exceptions aren't always caught", then perhaps changing __try/__except to try/catch is the right thing to do.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Thanks CornedBee and Mats,
I decide to make a change. :-)
Looks like /EHa mode with an additonal handler for set_se_translator to convert structured exception into C++ exception is the optimum solution -- since structured exception could also trigger destructor invocaton of local object during stack unwinding and if we translate structured exception into C++ exception, we can get more information from the exception.
How do you think of this "final and optimum" solution?
regards,
George