From: Jakub Narebski Date: Sat, 30 Jan 2010 22:30:44 GMT Subject: [PATCH 7/8 v6] gitweb: Add optional extra parameter to die_error, for extended explanation Message-ID: <1264890645-28310-8-git-send-email-jnareb@gmail.com> In-Reply-To: <1264890645-28310-1-git-send-email-jnareb@gmail.com> From: John 'Warthog9' Hawley 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. Signed-off-by: John 'Warthog9' Hawley Signed-off-by: Jakub Narebski --- Changes from version from 'Gitweb caching v5' and git://git.kernel.org/pub/scm/git/warthog9/gitweb.git gitweb-ml-v5 * Slightly changed commit summary (commit description). * Align with spaces, instead of indenting with tab Those changes are purely cosmetic; the commit is practically unchanged from the version by J.H. gitweb/gitweb.perl | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 466fa8a..d0c3ff2 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; } -- 1.6.6.1