diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-12 23:23:25 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-12 23:23:25 -0400 |
commit | e3c0e4977449de2eec36e254a7e131693ba2f822 (patch) | |
tree | 09fd42fb4d3328a36dd3622a47cb449b68f35149 /IkiWiki | |
parent | e4e3d7e2d4195bcd22c467522719c9c6dd39216b (diff) | |
download | ikiwiki-e3c0e4977449de2eec36e254a7e131693ba2f822.tar ikiwiki-e3c0e4977449de2eec36e254a7e131693ba2f822.tar.gz |
only htmlize errors when cgi is actually running
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/CGI.pm | 10 |
1 files changed, 10 insertions, 0 deletions
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"), + "<p class=\"error\">".gettext("Error").": $message</p>"); + die $@; +} #}}} + 1 |