sink = new CompilationUnitSink() {
public File writeOutput(CompilationUnit compilationUnit) {
try {
JsWriter out = new JsWriter(new OutputStreamWriter(new FileOutputStream(outputFile, true), "UTF-8"));
try {
try {
out.setOptions(getOptions());
compilationUnit.visit(new JsCodeGenerator(out));
} finally {
out.close();
}
} catch (IOException e) {
//noinspection ResultOfMethodCallIgnored
outputFile.delete(); // NOSONAR
throw Jooc.error("error writing file: '" + outputFile.getAbsolutePath() + "'", outputFile, e);