From: John 'Warthog9' Hawley Date: Thu, 14 Jan 2010 01:22:58 GMT Subject: [PATCH 2/9] gitweb: change die_error to take "extra" argument for extended die information Message-ID: <1263432185-21334-3-git-send-email-warthog9@eaglescrag.net> In-Reply-To: <1263432185-21334-2-git-send-email-warthog9@eaglescrag.net> This is a small change that just adds a 3rd, optional, parameter to die_error that allows for extended error information to be output along with what the error was. --- gitweb/gitweb.perl | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 0a07d3a..8298de5 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3391,6 +3391,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', @@ -3405,8 +3406,13 @@ sub die_error {

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