mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Crash protection for faulty modules that raise exceptions when reporting their help info.
This commit is contained in:
parent
b1b6747c76
commit
ed47087267
@ -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'})});
|
||||
|
Loading…
Reference in New Issue
Block a user