Mercurial > hg > graal-compiler
diff src/share/vm/classfile/classFileParser.cpp @ 17879:d55853ba088b
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 | 9acf9c25774d |
children | 7e6c20c85ccf |
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp Tue Apr 15 12:39:00 2014 -0700 +++ 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; }