8044398: Attach code should propagate errors in Diagnostic Commands as errors
Reviewed-by: dcubed, mgronlun
This commit is contained in:
parent
ad6d8d6abd
commit
7142b60efc
@ -162,10 +162,7 @@ static jint jcmd(AttachOperation* op, outputStream* out) {
|
||||
java_lang_Throwable::print(PENDING_EXCEPTION, out);
|
||||
out->cr();
|
||||
CLEAR_PENDING_EXCEPTION;
|
||||
// The exception has been printed on the output stream
|
||||
// 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_ERR;
|
||||
}
|
||||
return JNI_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user