Revision: 22
Author:   matt
Date:     2006-07-31 21:23:52 +0000 (Mon, 31 Jul 2006)

Log Message:
-----------
Prevent a plugin failure taking down the server

Modified Paths:
--------------
    trunk/lib/AxKit2/Client.pm

Modified: trunk/lib/AxKit2/Client.pm
===================================================================
--- trunk/lib/AxKit2/Client.pm  2006-07-31 21:19:35 UTC (rev 21)
+++ trunk/lib/AxKit2/Client.pm  2006-07-31 21:23:52 UTC (rev 22)
@@ -67,7 +67,8 @@
     for my $plugin ($conf->plugins) {
         my $plug = plugin_instance($plugin) || next;
         for my $h ($plug->hooks($hook)) {
-            @r = $plug->$h($self, $conf, @_);
+            eval { @r = $plug->$h($self, $conf, @_) };
+            $@ and $self->log(LOGERROR, "FATAL PLUGIN ERROR: $@");
             next unless @r;
             last MAINLOOP unless $r[0] == DECLINED;
         }


Reply via email to