提交 b8f437a5 编写于 作者: K kohsuke

modified to check for Win32 error message even for Unix machines, since slaves may be Windows.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2238 71c3de6d-444a-0410-be80-ed276b4c234a
上级 2d5ad2ed
......@@ -159,7 +159,7 @@ public class Util {
return tmp;
}
private static final Pattern errorCodeParser = Pattern.compile(".*error=([0-9]+).*");
private static final Pattern errorCodeParser = Pattern.compile(".*CreateProcess.*error=([0-9]+).*");
/**
* On Windows, error messages for IOException aren't very helpful.
......@@ -178,9 +178,6 @@ public class Util {
* null if there seems to be no error code or if the platform is not Win32.
*/
public static String getWin32ErrorMessage(IOException e) {
if(File.separatorChar!='\\')
return null; // not Windows
Matcher m = errorCodeParser.matcher(e.getMessage());
if(!m.matches())
return null; // failed to parse
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册