Skip to content
Sharp

Exceptions · interview question

Which is an anti-pattern in catch blocks?

Multiple choiceHardchapter-6-curatedpremiumexceptionstry-catch-finally
Choose one answer
Answer and explanation

Correct answer

B. Catching 'Exception' without handling it

Why

Catching 'Exception' without handling it effectively is an anti-pattern because it swallows all exceptions, potentially masking issues and making debugging difficult.

Test yourself on Exceptions

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

Start free test
All Exceptions questions →