提交 55859664 编写于 作者: S sla

8044398: Attach code should propagate errors in Diagnostic Commands as errors

Reviewed-by: dcubed, mgronlun
上级 b485782b
...@@ -162,10 +162,7 @@ static jint jcmd(AttachOperation* op, outputStream* out) { ...@@ -162,10 +162,7 @@ static jint jcmd(AttachOperation* op, outputStream* out) {
java_lang_Throwable::print(PENDING_EXCEPTION, out); java_lang_Throwable::print(PENDING_EXCEPTION, out);
out->cr(); out->cr();
CLEAR_PENDING_EXCEPTION; CLEAR_PENDING_EXCEPTION;
// The exception has been printed on the output stream return JNI_ERR;
// If the JVM returns JNI_ERR, the attachAPI throws a generic I/O
// exception and the content of the output stream is not processed.
// By returning JNI_OK, the exception will be displayed on the client side
} }
return JNI_OK; return JNI_OK;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册