X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4e1d7d8ff281777c53805072978d4718b8532863..ed7f892072d5956f7b71c09ff72585d1c0450868:/IkiWiki/CGI.pm?ds=sidebyside diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 6770f6feb..d805506aa 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -750,4 +750,14 @@ sub cgi (;$$) { #{{{ } } #}}} +# Does not need tobe called directly; all errors will go through here. +sub cgierror ($) { #{{{ + my $message=shift; + + print "Content-type: text/html\n\n"; + print misctemplate(gettext("Error"), + "
".gettext("Error").": $message
"); + die $@; +} #}}} + 1