Comitted to my tree as commit 815c6d8223822461dd754f82ed6785ae319e0669

will try and get it to Ask's tree soon, once we figure out how that works.


Steve Kemp wrote:
> 
> 
>    I've got many non-standard plugins and for a given
>   fatal error it is non-trivial to determine which of
>   them was to blame.
> 
>    Perhaps this patch would be useful?  (Against SVN,
>  not git, but I think that shouldn't matter too much..)
> 
> Steve
> -- 
> Stop blog&forum spam
> http://blogspam.net/
> 
> Index: lib/Qpsmtpd.pm
> ===================================================================
> --- lib/Qpsmtpd.pm  (revision 967)
> +++ lib/Qpsmtpd.pm  (working copy)
> @@ -412,7 +412,7 @@
>          my @r;
>          for my $code (@{$hooks->{$hook}}) {
>              eval { (@r) = $code->{code}->($self, $self->transaction, @_); };
> -            $@ and warn("FATAL PLUGIN ERROR: ", $@) and next;
> +            $@ and warn("FATAL PLUGIN ERROR [" . $code->{name} . "]: ", $@) 
> and next;
>              if ($r[0] == YIELD) {
>                  die "YIELD not valid from $hook hook";
>              }
> @@ -444,7 +444,7 @@
>      $self->varlog(LOGDEBUG, $hook, $code->{name});
>      my $tran = $self->transaction;
>      eval { (@r) = $code->{code}->($self, $tran, @$args); };
> -    $@ and $self->log(LOGCRIT, "FATAL PLUGIN ERROR: ", $@) and next;
> +    $@ and $self->log(LOGCRIT, "FATAL PLUGIN ERROR [" . $code->{name} . "]: 
> ", $@) and next;
>  
>      !defined $r[0]
>          and $self->log(LOGERROR, "plugin ".$code->{name}
> 

Reply via email to