8233446: Improve error handling when specified dynamic archive doesn't exist
Reviewed-by: lfoltan, ccheung
This commit is contained in:
parent
af586a9cf2
commit
2429c8a484
@ -1038,17 +1038,12 @@ bool FileMapInfo::open_for_read() {
|
|||||||
}
|
}
|
||||||
int fd = os::open(_full_path, O_RDONLY | O_BINARY, 0);
|
int fd = os::open(_full_path, O_RDONLY | O_BINARY, 0);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
if (is_static()) {
|
|
||||||
if (errno == ENOENT) {
|
if (errno == ENOENT) {
|
||||||
// Not locating the shared archive is ok.
|
|
||||||
fail_continue("Specified shared archive not found (%s).", _full_path);
|
fail_continue("Specified shared archive not found (%s).", _full_path);
|
||||||
} else {
|
} else {
|
||||||
fail_continue("Failed to open shared archive file (%s).",
|
fail_continue("Failed to open shared archive file (%s).",
|
||||||
os::strerror(errno));
|
os::strerror(errno));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
log_warning(cds, dynamic)("specified dynamic archive doesn't exist: %s", _full_path);
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user