]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Improve error message if external plugin fails to load. Closes: #498458
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 11 Sep 2008 05:41:55 +0000 (01:41 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 11 Sep 2008 05:41:55 +0000 (01:41 -0400)
IkiWiki.pm
debian/changelog

index 81c9a92f4fcd83e20726ba81033e9d0976b4aa49..4e4da11c5a016daa9d04c0b6ee04df7f786a14a7 100644 (file)
@@ -520,7 +520,11 @@ sub loadplugin ($) { #{{{
        foreach my $dir (defined $config{libdir} ? possibly_foolish_untaint($config{libdir}) : undef,
                         "$installdir/lib/ikiwiki") {
                if (defined $dir && -x "$dir/plugins/$plugin") {
-                       require IkiWiki::Plugin::external;
+                       eval { require IkiWiki::Plugin::external };
+                       if ($@) {
+                               my $reason=$@;
+                               error(sprintf(gettext("failed to load external plugin needed for %s plugin: %s"), $plugin, $reason));
+                       }
                        import IkiWiki::Plugin::external "$dir/plugins/$plugin";
                        $loaded_plugins{$plugin}=1;
                        return 1;
index 423ce12ed2eac02fa60c5961726e140e89eac530..f493eb3c2d15bef01a20042fd339d41407c814fb 100644 (file)
@@ -10,6 +10,7 @@ ikiwiki (2.64) UNRELEASED; urgency=low
     external dependency and is not commonly used. If you use otl, make sure
     you explicitly enable it now.
   * goodstuff: Add more, progress, and table plugins to the bundle.
+  * Improve error message if external plugin fails to load. Closes: #498458
 
  -- Joey Hess <joeyh@debian.org>  Mon, 08 Sep 2008 19:21:20 -0400