CompTIA Security+ (SY0-501) — Question 378
Which of the following outcomes is a result of proper error-handling procedures in secure code?
Answer options
- A. Execution continues with no notice or logging of the error condition.
- B. Minor fault conditions result in the system stopping to preserve state.
- C. The program runs through to completion with no detectable impact or output.
- D. All fault conditions are logged and do not result in a program crash.
Correct answer: D
Explanation
The correct answer is D because effective error-handling ensures that all fault conditions are logged, allowing developers to address issues without crashing the program. Options A and C suggest a lack of any error management, which can lead to undetected problems, while option B indicates an overly drastic response to minor issues that could be handled more gracefully.