Skip to content

Commit aa14013

Browse files
warthog9gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Jakub Narebski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1ee4b4e commit aa14013

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gitweb/gitweb.perl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3392,6 +3392,7 @@ sub git_footer_html {
33923392
sub die_error {
33933393
my $status = shift || 500;
33943394
my $error = shift || "Internal server error";
3395+
my $extra = shift;
33953396

33963397
my %http_responses = (
33973398
400 => '400 Bad Request',
@@ -3406,8 +3407,13 @@ sub die_error {
34063407
<br /><br />
34073408
$status - $error
34083409
<br />
3409-
</div>
34103410
EOF
3411+
if (defined $extra) {
3412+
print "<hr />\n" .
3413+
"$extra\n";
3414+
}
3415+
print "</div>\n";
3416+
34113417
git_footer_html();
34123418
exit;
34133419
}

0 commit comments

Comments
 (0)