Skip to content
Permalink
Browse files

[FIXED JENKINS-27710]: close the output also if file modification was…

… interrupted. 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 c177a7fbfad44ce9f3813fedce543877fd705d74
@@ -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 c177a7f

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