 In this practice, only errors from outside the program's control are to be handled (such as user input); the software itself, as well as data from within the program's line of defense, are to be trusted in this methodology.const char* trafficlight_colorname(enum trafficlight_color c) {


const char* trafficlight_colorname(enum trafficlight_color c) {


if (is_legacy_compatible(user_config)) {
} else {

// Trust that the new code has no new bugs
new_code(user_config);
Here are some defensive programming techniques