jdk/src/windows/native/sun/tools/attach/WindowsVirtualMachine.c
changeset 23570 6b0a90ae5eaa
parent 19442 00965155a4c5
child 24363 33b869a8806b
--- a/jdk/src/windows/native/sun/tools/attach/WindowsVirtualMachine.c	Mon Mar 24 14:14:03 2014 +0400
+++ b/jdk/src/windows/native/sun/tools/attach/WindowsVirtualMachine.c	Mon Mar 24 13:16:25 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -273,7 +273,9 @@
           NULL);                        // default security attribute
 
     if (hPipe == INVALID_HANDLE_VALUE) {
-        JNU_ThrowIOExceptionWithLastError(env, "CreateNamedPipe failed");
+        char msg[256];
+        _snprintf(msg, sizeof(msg), "CreateNamedPipe failed: %d", GetLastError());
+        JNU_ThrowIOExceptionWithLastError(env, msg);
     }
     return (jlong)hPipe;
 }