Ctrl K
Java · Senior · Theory

How do you design error handling in a large Java application: where do you use checked exceptions, where unchecked, and how do errors reach the API client?

~4 min by voice

How to approach it

The interviewer wants to see whether you have a deliberate error-handling policy for the whole application: when to use checked, when unchecked, how not to lose the cause, how an error passes through layers and transactions, and in what form it reaches the API client.

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics
Similar questionsWrite a retry decorator with parameters: the number of attempts, the pause between attempts, and a tuple of exceptions on which to retry. If all attempts end in an error, the last exception should propagate out. Mid-levelHow do you organize exception handling in a Spring application: where do you catch exceptions, and when do you use checked versus unchecked exceptions? Mid-levelTell me about the exception hierarchy in Java. How do checked exceptions differ from unchecked ones? Junior

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~4 min