mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
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
This commit is contained in:
1 parent
2d5ad2ed2a
commit
b8f437a583
1 file changed
+1
-4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user