Crash protection for faulty modules that raise exceptions when reporting their help info.

This commit is contained in:
ian%hixie.ch 2004-01-26 20:06:40 +00:00
parent b1b6747c76
commit ed47087267

View File

@ -41,7 +41,14 @@ sub Told {
# first, build the help file...
my %topicList;
foreach my $module (@modules) {
my $commands = $module->Help($event);
my $commands;
eval {
$commands = $module->Help($event);
};
if ($@) {
$self->debug("Module $module is having errors reporting help:\n$@");
next;
}
if ($commands->{''}) {
my @commands = grep { /./os } keys %$commands;
$topicList{lc($module->{'_name'})} = [] unless defined($topicList{lc($module->{'_name'})});