Exceptions refactoring 2