mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-15 17:16:10 +00:00
capture retrieve_fd fatal error, log the underlie message
This commit is contained in:
@ -8239,7 +8239,13 @@ sub loadsdrcache {
|
||||
if (!open($fh, "<$file")) {
|
||||
return (1);
|
||||
}
|
||||
$r = retrieve_fd($fh);
|
||||
eval {
|
||||
$r = retrieve_fd($fh);
|
||||
}
|
||||
if($@){
|
||||
xCAT::MsgUtils->message("S", "loadsdrcache: Fatal error while retrieving data from $file, $@");
|
||||
return 1;
|
||||
}
|
||||
unless ($r) { close($fh); return 1; }
|
||||
unless ($r->{xcat_sdrcacheversion} and $r->{xcat_sdrcacheversion} == $cache_version) { close($fh); return 1; } #version mismatch
|
||||
|
||||
|
Reference in New Issue
Block a user