Refactoring 'SyntaxErrorException'