Problem Statement
What is exception translation and when is it appropriate?
Explanation
Exception translation means catching a low-level exception and throwing a higher-level, more meaningful one. It’s appropriate when moving across layers—for example, converting SQLException into a domain-specific DataAccessException. Preserve the cause using the constructor so the original stack trace remains available.
Practice Sets
This question appears in the following practice sets: