提交 9bcf9b0b 编写于 作者: K Kohsuke Kawaguchi

[FIXED JENKINS-11598] improving the error diagnostics.

Note that the root cause isn't in Jenkins. See "Caused by: java.net.ConnectException: Connection refused: connect" line that indicates a problem in the network connectivity. But this change improves the error diagnostics.
上级 887d6cff
......@@ -622,6 +622,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable {
* @see DownloadJob
*/
public File download(DownloadJob job, URL src) throws IOException {
try {
URLConnection con = connect(job,src);
int total = con.getContentLength();
CountingInputStream in = new CountingInputStream(con.getInputStream());
......@@ -653,6 +654,9 @@ public class UpdateCenter extends AbstractModelObject implements Saveable {
}
return tmp;
} catch (IOException e) {
throw new IOException2("Failed to download from "+src,e);
}
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册