Refactoring: Replace Exception with Test
Exceptions are mechanism to transport information about errors in object-oriented code. But they come with performance hit when not used carefully. Still we find a lot of code when exceptions are not avoided but used as a control mechanism in code flow. This post introduces replace exception with test refactoring that helps us to avoid at least some exceptions.
Read more