Find patterns of exceptions in a file.

    @param codes: code of the file to check
    @param patternFinder: a visitor for pattern checking and save results

def findPatternsInFile(codes, patternFinder):
    """
    Find patterns of exceptions in a file.

    @param codes: code of the file to check
    @param patternFinder: a visitor for pattern checking and save results
    """
    tree = ast.parse(codes)
    patternFinder.visit(tree)