Comment Re:No Exceptions?! (Score 1) 831
One of the key problems with Exceptions is that they tend to violate security models.
It is probably not common knowledge that C++ exceptions on the Windows platform are implemented using Structured Exceptions, an exception mechanism built into the Operating System that works even in C. I suggest reading up on Structured Exceptions if you are not already familiar with them.
Let's say you have implemented a Windows Service in C++, and that at some point you change your thread's security token. Changing a thread security token is usually done to perform an action on behalf of a client using the client's credentials. Unfortunately, the Structured Exception system has no idea that you have changed the security token of your thread. If an action performed on behalf of the user while using the user's token throws an exception that is not caught within the scope of the function that altered the thread security token, well, congratulations! you've just violated your security model. Why? Because the exception handler that does catch the exception is in a parent scope and is now executing with the user's security token and not the original security token of the process. At best this means your exception handler may fail to work, and worst it can lead to a privilege escalation.
And, no, using catch(...) is not a valid way of solving this security problem.