PrepAway - Latest Free Exam Questions & Answers

Which of the following is the best practice for error a…

Which of the following is the best practice for error and exception handling?

PrepAway - Latest Free Exam Questions & Answers

A.
Log detailed exception but display generic error message

B.
Display detailed exception but log generic error message

C.
Log and display detailed error and exception messages

D.
Do not log or display error or exception messages

Explanation:
A detailed explanation of the error is not helpful for most end users but might provide information that is useful
to a hacker. It is therefore better to display a simple but helpful message to the end user and log the detailed
information to an access-restricted log file for the administrator and programmer who would need as much
information as possible about the problem in order to rectify it.


Leave a Reply