summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorJohn 'Warthog9' Hawley <warthog9@kernel.org>2010-01-30 22:30:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-30 23:53:55 (GMT)
commitaa14013abf27637dc2a2c0bee56fb98a981ee08d (patch)
treea66fd36b3a990bbf31abec59be5f6a161694dd5e /gitweb/gitweb.perl
parent1ee4b4ef70e26c540d028cc497313000e63cd7dc (diff)
downloadgit-aa14013abf27637dc2a2c0bee56fb98a981ee08d.zip
git-aa14013abf27637dc2a2c0bee56fb98a981ee08d.tar.gz
git-aa14013abf27637dc2a2c0bee56fb98a981ee08d.tar.bz2
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 <warthog9@kernel.org> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl8
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 {
<br /><br />
$status - $error
<br />
-</div>
EOF
+ if (defined $extra) {
+ print "<hr />\n" .
+ "$extra\n";
+ }
+ print "</div>\n";
+
git_footer_html();
exit;
}