Skip to content
Permalink
Browse files

[JENKINS-42934] Need to catch a different exception

  • Loading branch information
stephenc committed Mar 20, 2017
1 parent f0cd7ae commit a7fc5701584bc28cd34fc3f018cc107616f7cd9a
Showing with 2 additions and 1 deletion.
  1. +2 −1 core/src/main/java/hudson/util/io/RewindableFileOutputStream.java
@@ -29,6 +29,7 @@
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.StandardOpenOption;
import org.apache.commons.io.FileUtils;

@@ -54,7 +55,7 @@ private synchronized OutputStream current() throws IOException {
FileUtils.forceMkdir(out.getParentFile());
try {
current = Files.newOutputStream(out.toPath(), StandardOpenOption.TRUNCATE_EXISTING);
} catch (FileNotFoundException e) {
} catch (FileNotFoundException | NoSuchFileException e) {
throw new IOException("Failed to open "+out,e);
}
}

0 comments on commit a7fc570

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