private boolean doFile(final File f, final SourceFileReader sourceFileReader) throws IOException, InterruptedException { final Collection<GeneratedImage> result = sourceFileReader.getGeneratedImages(); boolean error = false; for (GeneratedImage g : result) { if (OptionFlags.getInstance().isVerbose()) { myLog(g + " " + g.getDescription()); } nbFiles.addAndGet(1); if (g.lineErrorRaw() != -1) { error = true; } } if (error) { myLog("Error: " + f.getCanonicalPath()); } if (error && option.isFailfastOrFailfast2()) { return true; } return false; }
private void eventuallyFailfast(final File error) throws IOException { if (error != null && option.isFailfastOrFailfast2()) { this.log("Error in file " + error.getCanonicalPath()); throw new BuildException("Error in file " + error.getCanonicalPath()); } }