mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-02 22:55:53 +00:00
improved error diagnostics.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1146 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
955c836fc4
commit
9793a71e28
1 file changed
+8
-2
@@ -1,5 +1,7 @@
|
||||
package hudson;
|
||||
|
||||
import hudson.util.IOException2;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -112,8 +114,12 @@ public final class FilePath {
|
||||
* Creates a temporary file.
|
||||
*/
|
||||
public FilePath createTempFile(String prefix, String suffix) throws IOException {
|
||||
File f = File.createTempFile(prefix, suffix, getLocal());
|
||||
return new FilePath(this,f.getName());
|
||||
try {
|
||||
File f = File.createTempFile(prefix, suffix, getLocal());
|
||||
return new FilePath(this,f.getName());
|
||||
} catch (IOException e) {
|
||||
throw new IOException2("Failed to create a temp file on "+getLocal(),e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user