Skip to content
Sharp

Exceptions · interview question

What is the clearest sign that code around try and except should be refactored?

Multiple choiceEasychapter-5-curatedpremiumexceptionstry-and-except
Choose one answer
Answer and explanation

Correct answer

C. When the rule is no longer easy to trace, explain, or change without breaking nearby behavior.

Why

A refactor is justified when the code stops communicating its intent. Wrap only the risky operation so the caught error still points to one understandable boundary.

Test yourself on Exceptions

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

Start free test
All Exceptions questions →