src/share/vm/services/attachListener.cpp
Print this page
rev 6493 : imported patch errors-from-jcmd
@@ -160,14 +160,11 @@
DCmd::parse_and_execute(DCmd_Source_AttachAPI, out, op->arg(0), ' ', THREAD);
if (HAS_PENDING_EXCEPTION) {
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;
}
// Implementation of "dumpheap" command.