mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-31 21:21:08 +00:00
Bug 340253: .cgi scripts should call Throw*Error() instead of die() - Patch by Fr�d�ric Buclin <LpSolit@gmail.com> r=vladd a=justdave
This commit is contained in:
parent
cb73b1734e
commit
d719aeb514
@ -1890,8 +1890,7 @@ foreach my $id (@idlist) {
|
|||||||
shift @oldlist;
|
shift @oldlist;
|
||||||
} else {
|
} else {
|
||||||
if ($oldlist[0] != $newlist[0]) {
|
if ($oldlist[0] != $newlist[0]) {
|
||||||
$dbh->bz_unlock_tables(UNLOCK_ABORT);
|
ThrowCodeError('list_comparison_error');
|
||||||
die "Error in list comparing code";
|
|
||||||
}
|
}
|
||||||
shift @oldlist;
|
shift @oldlist;
|
||||||
shift @newlist;
|
shift @newlist;
|
||||||
|
@ -232,7 +232,8 @@ sub chart_image_name {
|
|||||||
# and number
|
# and number
|
||||||
|
|
||||||
if ($datasets !~ m/^[A-Za-z0-9:]+$/) {
|
if ($datasets !~ m/^[A-Za-z0-9:]+$/) {
|
||||||
die "Invalid datasets $datasets";
|
$vars->{'datasets'} = $datasets;
|
||||||
|
ThrowUserError('invalid_datasets', $vars);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Since we pass the tests, consider it OK
|
# Since we pass the tests, consider it OK
|
||||||
|
@ -192,7 +192,10 @@
|
|||||||
[% title = "Invalid Series" %]
|
[% title = "Invalid Series" %]
|
||||||
The series_id [% series_id FILTER html %] is not valid. It may be that
|
The series_id [% series_id FILTER html %] is not valid. It may be that
|
||||||
this series has been deleted.
|
this series has been deleted.
|
||||||
|
|
||||||
|
[% ELSIF error == "list_comparison_error" %]
|
||||||
|
Unexpected error in list comparing code.
|
||||||
|
|
||||||
[% ELSIF error == "mismatched_bug_ids_on_obsolete" %]
|
[% ELSIF error == "mismatched_bug_ids_on_obsolete" %]
|
||||||
Attachment [% attach_id FILTER html %] ([% description FILTER html %])
|
Attachment [% attach_id FILTER html %] ([% description FILTER html %])
|
||||||
is attached to [% terms.bug %] [%+ attach_bug_id FILTER html %],
|
is attached to [% terms.bug %] [%+ attach_bug_id FILTER html %],
|
||||||
|
@ -696,6 +696,11 @@
|
|||||||
The context [% context FILTER html %] is invalid (must be a number,
|
The context [% context FILTER html %] is invalid (must be a number,
|
||||||
"file" or "patch").
|
"file" or "patch").
|
||||||
|
|
||||||
|
[% ELSIF error == "invalid_datasets" %]
|
||||||
|
[% title = "Invalid Datasets" %]
|
||||||
|
Invalid datasets <em>[% datasets FILTER html %]</em>. Only digits,
|
||||||
|
letters and colons are allowed.
|
||||||
|
|
||||||
[% ELSIF error == "invalid_format" %]
|
[% ELSIF error == "invalid_format" %]
|
||||||
[% title = "Invalid Format" %]
|
[% title = "Invalid Format" %]
|
||||||
The format "[% format FILTER html %]" is invalid (must be one of
|
The format "[% format FILTER html %]" is invalid (must be one of
|
||||||
|
Loading…
Reference in New Issue
Block a user