nerdexam
Oracle

1Z0-807 · Question #66

Which three actions represent best practices when implementing an exception handling strategy for an application?

The correct answer is A. Create a custom checked exception if an alternative action can be taken to resolve the exception. B. Create a custom unchecked exception if the action to resolve the exception cannot be defined. C. Always log the specific exception before re-throwing a wrapped exception. See the full explanation below for the reasoning.

Question

Which three actions represent best practices when implementing an exception handling strategy for an application?

Options

  • ACreate a custom checked exception if an alternative action can be taken to resolve the exception.
  • BCreate a custom unchecked exception if the action to resolve the exception cannot be defined.
  • CAlways log the specific exception before re-throwing a wrapped exception.
  • DAlways throw exceptions in methods that are designed for exception handling.
  • EAlways include information specific to the error when logging an exception.

How the community answered

(36 responses)
  • A
    78% (28)
  • D
    17% (6)
  • E
    6% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-807 Practice