]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Add optional extra parameter to die_error, for extended explanation
authorJohn 'Warthog9' Hawley <redacted>
Sat, 30 Jan 2010 22:30:44 +0000 (23:30 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:39 +0000 (00:50 -0400)
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 <redacted>
Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 6cac707865e78d3bb476ab20711564fb36d8422a5b773b1f99147ad4ab454731..04e1c562553bac77c5229580c7e06d68c2bdd1e27bf5108a442c8138a159b9af 100755 (executable)
@@ -3393,6 +3393,7 @@ sub git_footer_html {
 sub die_error {
        my $status = shift || 500;
        my $error = shift || "Internal server error";
 sub die_error {
        my $status = shift || 500;
        my $error = shift || "Internal server error";
+       my $extra = shift;
 
        my %http_responses = (
                400 => '400 Bad Request',
 
        my %http_responses = (
                400 => '400 Bad Request',
@@ -3407,8 +3408,13 @@ sub die_error {
 <br /><br />
 $status - $error
 <br />
 <br /><br />
 $status - $error
 <br />
-</div>
 EOF
 EOF
+       if (defined $extra) {
+               print "<hr />\n" .
+                     "$extra\n";
+       }
+       print "</div>\n";
+
        git_footer_html();
        exit;
 }
        git_footer_html();
        exit;
 }
This page took 0.162213 seconds and 4 git commands to generate.