Mercurial > hg > graal-compiler
changeset 16274:60c3f610183e
separate error messages for missing versus invalid non-String option values
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 27 Jun 2014 22:58:54 +0200 |
parents | d6ffc6164830 |
children | 7af7db0bbfe9 |
files | src/share/vm/graal/graalRuntime.cpp |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/graal/graalRuntime.cpp Fri Jun 27 22:21:40 2014 +0200 +++ b/src/share/vm/graal/graalRuntime.cpp Fri Jun 27 22:58:54 2014 +0200 @@ -868,7 +868,12 @@ } ResourceMark rm(THREAD); char buf[200]; - jio_snprintf(buf, sizeof(buf), "Invalid %s value for Graal option %.*s: %s", (spec == 'i' ? "numeric" : "float/double"), name, name_len, value); + bool missing = strlen(value) == 0; + if (missing) { + jio_snprintf(buf, sizeof(buf), "Missing %s value for Graal option %.*s", (spec == 'i' ? "numeric" : "float/double"), name_len, name); + } else { + jio_snprintf(buf, sizeof(buf), "Invalid %s value for Graal option %.*s: %s", (spec == 'i' ? "numeric" : "float/double"), name_len, name, value); + } THROW_MSG_(vmSymbols::java_lang_InternalError(), buf, 0L); }