Skip to content
Sharp

Exceptions · interview question

In a complex e-commerce system, some errors should be logged and ignored. Which exception type suits this pattern?

Multiple choiceHardchapter-6-curatedpremiumexceptionschecked-vs-unchecked-exceptions
Choose one answer
Answer and explanation

Correct answer

A. Custom unchecked exception

Why

A custom unchecked exception allows the system to define specific conditions where errors can be logged and ignored without enforcing strict handling. This approach gives developers the flexibility to handle and ignore non-critical errors based on application logic.

Test yourself on Exceptions

A free test with instant, explained results. No account needed.

Start free test
All Exceptions questions →