Development guide

Error Handling

Use C++ exceptions instead of return values to report exceptional program states.
Always derive exception classes from CException. Do not create a separate exception class hierarchy.
Destructors, deallocation and swap never fail (throw exceptions).
Use existing exception classes instead of defining new ones.
Always throw by value and catch by reference. Do not throw pointer types or types that are not subclasses of std::exception.