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:
kohsuke committed 2006-11-18 01:31:49 +00:00
1 parent 955c836fc4
commit 9793a71e28
1 file changed
+8 -2
+8 -2
View File
@@ -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);
}
}
/**