Skip to content
Sharp

Exceptions · interview question

Why are exceptions part of API design, not just syntax?

Multiple choiceEasychapter-6-curatedpremiumexceptionsexceptions-basics
Choose one answer
Answer and explanation

Correct answer

A. They communicate what can go wrong and who is expected to respond

Why

Exceptions describe failure paths in the API itself. Good exception design makes it clearer what the code refuses to allow, what might fail externally, and which layer is meant to react.

Test yourself on Exceptions

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

Start free test
All Exceptions questions →