PrintWriter doesn't throw exceptions, so call checkError()

This commit is contained in:
zzz
2015-05-06 01:51:57 +00:00
parent 77c9a644ac
commit 2aafc23774
5 changed files with 13 additions and 0 deletions

View File

@@ -322,6 +322,8 @@ public class WorkingDir {
out.println(s);
}
System.err.println("Copied " + oldFile + " with modifications");
if (out.checkError())
throw new IOException("Failed write to " + newFile);
return true;
} catch (IOException ioe) {
if (in != null) {