From: John 'Warthog9' Hawley Date: Sat, 30 Jan 2010 22:30:44 +0000 (+0100) Subject: gitweb: Add optional extra parameter to die_error, for extended explanation X-Git-Tag: v1.7.0-rc2~22^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=aa14013abf27637dc2a2c0bee56fb98a981ee08d;p=git.git gitweb: Add optional extra parameter to die_error, for extended explanation Add a 3rd, optional, parameter to die_error to allow for extended error information to be output along with what the error was. Signed-off-by: John 'Warthog9' Hawley Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 466fa8aad..d0c3ff258 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3392,6 +3392,7 @@ sub git_footer_html { sub die_error { my $status = shift || 500; my $error = shift || "Internal server error"; + my $extra = shift; my %http_responses = ( 400 => '400 Bad Request', @@ -3406,8 +3407,13 @@ sub die_error {

$status - $error
- EOF + if (defined $extra) { + print "
\n" . + "$extra\n"; + } + print "\n"; + git_footer_html(); exit; }