mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 02:49:49 +01:00
EventDispatcher: remove handler if it has errors
This commit is contained in:
parent
b7e622a32e
commit
f557307a8a
@ -52,8 +52,8 @@ sub dispatch_event {
|
||||
if ($@) {
|
||||
chomp $@;
|
||||
$self->{pbot}->{logger}->log("Error in event handler: $@\n");
|
||||
#$self->{pbot}->{logger}->log("Removing handler.\n");
|
||||
#splice @{$self->{handlers}->{$event_type}}, $i--, 1;
|
||||
$self->{pbot}->{logger}->log("Removing handler.\n");
|
||||
splice @{$self->{handlers}->{$event_type}}, $i--, 1;
|
||||
}
|
||||
|
||||
return $ret if $ret;
|
||||
@ -72,8 +72,8 @@ sub dispatch_event {
|
||||
if ($@) {
|
||||
chomp $@;
|
||||
$self->{pbot}->{logger}->log("Error in event handler: $@\n");
|
||||
#$self->{pbot}->{logger}->log("Removing handler.\n");
|
||||
#splice @{$self->{handlers}->{any}}, $i--, 1;
|
||||
$self->{pbot}->{logger}->log("Removing handler.\n");
|
||||
splice @{$self->{handlers}->{any}}, $i--, 1;
|
||||
}
|
||||
|
||||
return $ret if $ret;
|
||||
|
Loading…
Reference in New Issue
Block a user