Have xCATd more clearly report when registering a plugin fails, also be resiliant to the situation.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11723 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-03-01 16:21:27 +00:00
parent b963e36dc7
commit 8d65490894

View File

@ -582,7 +582,14 @@ sub scan_plugins {
next;
}
no strict 'refs';
my $cmd_adds=${"xCAT_plugin::".$modname."::"}{handled_commands}->();
my $cmd_adds;
eval {
$cmd_adds=${"xCAT_plugin::".$modname."::"}{handled_commands}->();
};
if ($@) {
xCAT::MsgUtils->message("S","Error registering module ".$_." ...skipping");
next;
}
foreach (keys %$cmd_adds) {
my $value = $_;
my @modulehandlerinfos;