提交 adf90eb6 编写于 作者: K kohsuke

improved error diagnostics for situations like...

improved error diagnostics for situations like http://www.nabble.com/Hudson-not-including-%22ant.bat%22-in-invocation-tt16588404.html#a16590273

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8508 71c3de6d-444a-0410-be80-ed276b4c234a
上级 e062f1da
......@@ -26,7 +26,15 @@ public class Main {
URL jar = Main.class.getResource("winstone.jar");
// put this jar in a file system so that we can load jars from there
File tmpJar = File.createTempFile("winstone", "jar");
File tmpJar;
try {
tmpJar = File.createTempFile("winstone", "jar");
} catch (IOException e) {
String tmpdir = System.getProperty("java.io.tmpdir");
IOException x = new IOException("Hudson has failed to create a temporary file in " + tmpdir);
x.initCause(e);
throw x;
}
copyStream(jar.openStream(), new FileOutputStream(tmpJar));
tmpJar.deleteOnExit();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册