for (String filename : files) {
File inputFile = new File(filename);
String cssFilename = toOutputFilename(outputDirectory, filename, Constants.CSS_SUFFIX);
String mapFilename = generateSourceMap? toOutputFilename(outputDirectory, filename, Constants.FULL_SOURCE_MAP_SUFFIX): null;
try {
CompilationResult content = compile(inputFile, toFile(cssFilename), generateSourceMap, isCompressing);
print.printToFiles(content, filename, inputFile, cssFilename, mapFilename);
} catch (Less4jException ex) {
CompilationResult partialResult = ex.getPartialResult();
if (printPartial) {
print.printToFiles(partialResult, filename, inputFile, cssFilename, mapFilename);
print.reportErrors(ex, filename, inputFile);
} else {
print.reportErrorsAndWarnings(ex, filename, inputFile);