else {
# wrapper passes a full config structure in the environment
# variable
- eval possibly_foolish_untaint($ENV{WRAPPED_OPTIONS});
+ eval {possibly_foolish_untaint($ENV{WRAPPED_OPTIONS})};
if ($@) {
error("WRAPPED_OPTIONS: $@");
}
}
elsif ($config{cgi}) {
require IkiWiki::CGI;
- cgi();
+ eval {cgi()};
+ if ($@) {
+ cgierror($@);
+ }
}
elsif ($config{render}) {
require IkiWiki::Render;