What are the three categories of errors according to Code Craft?
user error, programmer error, and exceptional circumstance
What will a good program do in response to a user error?
Help the user rectify it
What programming technique helps stop the cycle of unhandled errors causing further error conditions?
Defensive programming
What kind of errors should ideally never occur?
Programmer errors
When something goes wrong in a subordinate component, what should it do?
Communicate the error upward to be dealt with by the caller
What should a caller do if it cannot handle an error propagated upward by a subordinate component?
Propagate it upward to be handled by a different caller
What does it mean for an error to be local in time?
It is discovered soon after it is created
What does it mean for an error to be local in space?
It is identified close to the site where it manifests
What is an effect on the code by handling errors ASAP?
The code is more self-documenting
When a caller cannot handle an error propagated to it and needs to propagate it up, what are the two ways it can do that?
Simply send it up, or reinterpret the information and send a more meaningful message
What is the part of the code that handles errors?
Error-handling code
What do bad programmers end up doing when they do not consider error conditions in the first place?
Long debugging sessions
Previous card
First card
Random order
Next card