Mar 09
One major disadvantage of using the error handling style I mentioned in A C/C++ Error Handling Discipline is that as you are using out parameters as opposed to a return value, any object returned from a function must have a default constructor. The alternative is to return values directly from the function and use exceptions for error handling.
This obviously isn’t an issue if you are using COM as you are forced into HRESULT-style code.
Recent Comments