Skip to content

Commit

Permalink
gitweb: Add optional extra parameter to die_error, for extended expla…
Browse files Browse the repository at this point in the history
…nation

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>
  • Loading branch information
John 'Warthog9' Hawley authored and Junio C Hamano committed Jan 30, 2010
1 parent 1ee4b4e commit aa14013
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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;
}
Expand Down

0 comments on commit aa14013

Please sign in to comment.