mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8056900: Enhance NoClassDefFound exception messaging
Add text to the message explaining the cause of the exception Reviewed-by: dholmes, sspitsyn, coleenp
This commit is contained in:
parent
006229255a
commit
5b7ff7579c
6 changed files with 180 additions and 7 deletions
|
@ -522,7 +522,11 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
|||
// if we are executing Java code. This is not a problem for CDS dumping phase since
|
||||
// it doesn't execute any Java code.
|
||||
ResourceMark rm(THREAD);
|
||||
THROW_MSG_(vmSymbols::java_lang_NoClassDefFoundError(), external_name(), false);
|
||||
Exceptions::fthrow(THREAD_AND_LOCATION,
|
||||
vmSymbols::java_lang_NoClassDefFoundError(),
|
||||
"Class %s, or one of its supertypes, failed class initialization",
|
||||
external_name());
|
||||
return false;
|
||||
}
|
||||
// return if already verified
|
||||
if (is_linked()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue