diff options
author | Simon McVittie <http://smcv.pseudorandom.co.uk/> | 2008-07-13 15:29:28 +0100 |
---|---|---|
committer | Simon McVittie <http://smcv.pseudorandom.co.uk/> | 2008-07-13 15:29:28 +0100 |
commit | c588845a051da89505db9e55158783e1650ff0e2 (patch) | |
tree | 21586594be52aa5b638d02b674c58345627b23ea /IkiWiki/CGI.pm | |
parent | e41e96f8325aa4ada5b37b79812c47a8737b753c (diff) | |
parent | f6e6d561e9d0269d8b52bf926adb3f782e777bde (diff) |
Merge branch 'css'
Diffstat (limited to 'IkiWiki/CGI.pm')
-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 |