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)
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