Exception hierarchy refactoring.