mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8016644: Improve UnsupportedClassVersionError message
Improved the UnsupportedClassVersionError message to hopefully be more user friendly Reviewed-by: coleenp, dholmes, twisti
This commit is contained in:
parent
7a48daef16
commit
dd25d6fed0
3 changed files with 91 additions and 5 deletions
|
@ -3746,18 +3746,24 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
|
|||
Exceptions::fthrow(
|
||||
THREAD_AND_LOCATION,
|
||||
vmSymbols::java_lang_UnsupportedClassVersionError(),
|
||||
"Unsupported major.minor version %u.%u",
|
||||
"Unsupported class file version %u.%u, "
|
||||
"this version of the Java Runtime only recognizes class file versions up to %u.%u",
|
||||
major_version,
|
||||
minor_version);
|
||||
minor_version,
|
||||
JAVA_MAX_SUPPORTED_VERSION,
|
||||
JAVA_MAX_SUPPORTED_MINOR_VERSION);
|
||||
} else {
|
||||
ResourceMark rm(THREAD);
|
||||
Exceptions::fthrow(
|
||||
THREAD_AND_LOCATION,
|
||||
vmSymbols::java_lang_UnsupportedClassVersionError(),
|
||||
"%s : Unsupported major.minor version %u.%u",
|
||||
"%s has been compiled by a more recent version of the Java Runtime (class file version %u.%u), "
|
||||
"this version of the Java Runtime only recognizes class file versions up to %u.%u",
|
||||
name->as_C_string(),
|
||||
major_version,
|
||||
minor_version);
|
||||
minor_version,
|
||||
JAVA_MAX_SUPPORTED_VERSION,
|
||||
JAVA_MAX_SUPPORTED_MINOR_VERSION);
|
||||
}
|
||||
return nullHandle;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue