Mercurial > hg > graal-compiler
diff src/share/vm/classfile/classFileParser.cpp @ 14335:4802ce6fbff6
8016644: Improve UnsupportedClassVersionError message
Summary: Improved the UnsupportedClassVersionError message to hopefully be more user friendly
Reviewed-by: coleenp, dholmes, twisti
author | ctornqvi |
---|---|
date | Mon, 10 Feb 2014 17:49:17 +0100 |
parents | 2e7b5143763f |
children | d8041d695d19 |
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp Sun Feb 09 13:28:58 2014 -0500 +++ b/src/share/vm/classfile/classFileParser.cpp Mon Feb 10 17:49:17 2014 +0100 @@ -3746,18 +3746,24 @@ 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; }