Originally Posted by
Cypher
try/finally is not C++, and those extensions you're talking about don't gel well with C++ objects. It's primarily designed for C code, as when using SEH you can't use objects with destructors.
Example:
__try
{
std::string MyString;
// do something with string
}
__finally
{
}
That will not compile.
RAII is how it's supposed to be done in C++, try/finally is a hack designed for C code, is not portable across compilers, etc. Basically, it's just 100% the WRONG way to do it in C++. C, yeah, I can see that being useful. But in C++ it's not only unnecessary, it's wrong.