8261480: MetaspaceShared::preload_and_dump should check exceptions

Reviewed-by: dholmes, ccheung
This commit is contained in:
Ioi Lam 2021-03-18 04:15:58 +00:00
parent 81ba5784ba
commit 2b93ae0019
13 changed files with 263 additions and 262 deletions

View file

@ -1268,14 +1268,7 @@ InstanceKlass* ClassLoader::load_class(Symbol* name, bool search_append_only, TR
name,
loader_data,
cl_info,
THREAD);
if (HAS_PENDING_EXCEPTION) {
if (DumpSharedSpaces) {
log_error(cds)("Preload Error: Failed to load %s", class_name);
}
return NULL;
}
CHECK_NULL);
result->set_classpath_index(classpath_index);
return result;
}