C++ error code, return value, assert, and exception
1. return value + error code traditional C++ technique to indicate error to client
2. logical error in coding, use assert to detect logical error during run time
3. logical error in design, use static_assert to detect compile time error due to design issues
4. exception, an extremely useful to tool to handle run time error gracefully.
2. logical error in coding, use assert to detect logical error during run time
3. logical error in design, use static_assert to detect compile time error due to design issues
4. exception, an extremely useful to tool to handle run time error gracefully.
<< Home