changeset 51493:29169633327c

8205719: Windows Java_sun_tools_attach_VirtualMachineImpl_enqueue() method should include exitCode in exception message Summary: Include GetExitCodeThread() result in the exception message Reviewed-by: sspitsyn, dcubed
author cjplummer
date Wed, 27 Jun 2018 19:09:17 -0700
parents 2d3e99a72541
children 480a96a43b62
files src/jdk.attach/windows/native/libattach/VirtualMachineImpl.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.attach/windows/native/libattach/VirtualMachineImpl.c	Wed Jun 27 17:02:41 2018 -0700
+++ b/src/jdk.attach/windows/native/libattach/VirtualMachineImpl.c	Wed Jun 27 19:09:17 2018 -0700
@@ -490,9 +490,11 @@
                         JNU_ThrowIOException(env,
                             "Unable to enqueue operation: the target VM does not support attach mechanism");
                         break;
-                    default :
-                        JNU_ThrowInternalError(env,
-                            "Remote thread failed for unknown reason");
+                    default : {
+                        char errmsg[128];
+                        sprintf(errmsg, "Remote thread failed for unknown reason (%d)", exitCode);
+                        JNU_ThrowInternalError(env, errmsg);
+                    }
                 }
             }
         }