diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-09-11 01:41:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-09-11 01:41:55 -0400 |
commit | a87cfbcb8d0b97a4261cd9337bd80a16dde266ce (patch) | |
tree | aa5004b0307778e867fc8318bdb14662afb392f1 /IkiWiki.pm | |
parent | 20ad20a87b27235d21a8c3476a1fe9e913c855d7 (diff) | |
download | ikiwiki-a87cfbcb8d0b97a4261cd9337bd80a16dde266ce.tar ikiwiki-a87cfbcb8d0b97a4261cd9337bd80a16dde266ce.tar.gz |
Improve error message if external plugin fails to load. Closes: #498458
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 81c9a92f4..4e4da11c5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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; |