Problem:
1. "For highly robust code, you should first assert and then handle the error" --- code Daquan p193.
Why not use error handling directly? Is it true that the effects of predicate an error before error processing are the same as that of direct error processing?
2. fill in all the memory allocated, so that you can check the memory allocation error. Fill in all allocated files and streams completely, so that you can find out file format errors. --- Code Daquan p206
What is "full fill "? What do these two sentences mean?
3. Fill in junk data before deleting an object --- code Daquan p206
Why?
4. Why can I select whether to compile the code?
--- Code Daquan p207
5. error handling has been proven to be one of the toughest problems in modern computer science. You cannot handle it arbitrarily. It is estimated that up to 90% of the Code in the program is used to handle exceptions, handle errors, or perform bookkeeping work, this means that only 10% of the code is used to handle the regular situation ....... But because error handling involves the entire system, it is best to treat it at the architectural level. --- Code Daquan P49
How to handle errors at the architecture level?
Personal reading assignments