fixed NPE.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2321 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-03-04 01:58:29 +00:00
1 parent 3738e82225
commit ca9ecb2478
1 file changed
+4 -1
+4 -1
View File
@@ -178,7 +178,10 @@ 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) {
Matcher m = errorCodeParser.matcher(e.getMessage());
String msg = e.getMessage();
if(msg==null)
return null; // no message
Matcher m = errorCodeParser.matcher(msg);
if(!m.matches())
return null; // failed to parse