提交 aa14013a 编写于 作者: J John 'Warthog9' Hawley 提交者: Junio C Hamano

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: NJohn 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: NJakub Narebski <jnareb@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 1ee4b4ef
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册