1.1 --- a/src/share/vm/jfr/jni/jfrJniMethod.cpp Sun Jun 07 18:57:54 2020 +0100 1.2 +++ b/src/share/vm/jfr/jni/jfrJniMethod.cpp Fri Jun 12 02:59:56 2020 +0100 1.3 @@ -191,7 +191,9 @@ 1.4 return JNI_TRUE; 1.5 } 1.6 if (!JfrRecorder::create(simulate_failure == JNI_TRUE)) { 1.7 - JfrJavaSupport::throw_illegal_state_exception("Unable to start Jfr", thread); 1.8 + if (!thread->has_pending_exception()) { 1.9 + JfrJavaSupport::throw_illegal_state_exception("Unable to start Jfr", thread); 1.10 + } 1.11 return JNI_FALSE; 1.12 } 1.13 return JNI_TRUE;