Skip to content
Permalink
Browse files

JENKINS-27710: close the output also if file modification was interru…

…pted. We also output some warning to the job console, to help troubleshooting a bit and propose a work-around
  • Loading branch information
lacostej committed Apr 2, 2015
1 parent 9ad4d89 commit b1d790c61a852b1006c280a1eaaa83234a288642
@@ -75,13 +75,33 @@ public Long call() throws IOException {
} catch (IOException ignore) {
}
}
if (closeOut)
out.close();
closeOutIfNecessary();
}
} else {
writeMessagesToOutput("\nWARNING: No change detected to Editor.log path: '" + path + "'.",
"\tThe unity3d plugin was probably unable to find it in its expected locations (see JENKINS-24265).",
"\tConsider using the -logFile argument to force a known editor.log path or report the issue.");
closeOutIfNecessary();
}
return pos;
}

private void closeOutIfNecessary() throws IOException {
if (closeOut)
out.close();
}

private void writeMessagesToOutput(String... msgs) {
PrintStream printStream = new PrintStream(out);
try {
for (String msg : msgs) {
printStream.println(msg);
}
} finally {
printStream.close();
}
}

private void forcePrintStacktrace(Throwable t) {
PrintStream printStream = new PrintStream(out);
try {

0 comments on commit b1d790c

Please sign in to comment.
You can’t perform that action at this time.