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
--- 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);
+ }
}
}
}