class CompileErrorValidator {

    public void validate(final File listingFile) {
        if (listingFile == null)
            throw new NullPointerException("File cannot be null.");

        final EtmPoint point = PointFactory.getPoint(getClass(), "validate");
        try {
            ListingParseResult parserResult;
            try {
                parserResult = listingParser.parseListing(listingFile);
            } catch (final IOException e) {
                throw new CclCommandException(
                        "Failed to parse listing data from file: " + listingFile.getAbsolutePath(), e);
            }
            if (!parserResult.getErrors().isEmpty())
                throw new CclCompilationException(
                        "Failure to compile code: " + parserResult.getErrors().iterator().next().getMessage());
        } finally {
            point.collect();
        }
    }

      CompileErrorValidator(final ListingParser listingParser);

}