diff --git a/webtools/bugzilla/process_bug.cgi b/webtools/bugzilla/process_bug.cgi index 9773dce6d02f..29b9990aecf5 100755 --- a/webtools/bugzilla/process_bug.cgi +++ b/webtools/bugzilla/process_bug.cgi @@ -1890,8 +1890,7 @@ foreach my $id (@idlist) { shift @oldlist; } else { if ($oldlist[0] != $newlist[0]) { - $dbh->bz_unlock_tables(UNLOCK_ABORT); - die "Error in list comparing code"; + ThrowCodeError('list_comparison_error'); } shift @oldlist; shift @newlist; diff --git a/webtools/bugzilla/reports.cgi b/webtools/bugzilla/reports.cgi index 947993a56beb..1181e3a81f1a 100755 --- a/webtools/bugzilla/reports.cgi +++ b/webtools/bugzilla/reports.cgi @@ -232,7 +232,8 @@ sub chart_image_name { # and number 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 diff --git a/webtools/bugzilla/template/en/default/global/code-error.html.tmpl b/webtools/bugzilla/template/en/default/global/code-error.html.tmpl index 0ec46461f852..5081589edd65 100644 --- a/webtools/bugzilla/template/en/default/global/code-error.html.tmpl +++ b/webtools/bugzilla/template/en/default/global/code-error.html.tmpl @@ -192,7 +192,10 @@ [% title = "Invalid Series" %] The series_id [% series_id FILTER html %] is not valid. It may be that this series has been deleted. - + + [% ELSIF error == "list_comparison_error" %] + Unexpected error in list comparing code. + [% ELSIF error == "mismatched_bug_ids_on_obsolete" %] Attachment [% attach_id FILTER html %] ([% description FILTER html %]) is attached to [% terms.bug %] [%+ attach_bug_id FILTER html %], diff --git a/webtools/bugzilla/template/en/default/global/user-error.html.tmpl b/webtools/bugzilla/template/en/default/global/user-error.html.tmpl index ac1bca1c24ba..5ffae70acc75 100644 --- a/webtools/bugzilla/template/en/default/global/user-error.html.tmpl +++ b/webtools/bugzilla/template/en/default/global/user-error.html.tmpl @@ -696,6 +696,11 @@ The context [% context FILTER html %] is invalid (must be a number, "file" or "patch"). + [% ELSIF error == "invalid_datasets" %] + [% title = "Invalid Datasets" %] + Invalid datasets [% datasets FILTER html %]. Only digits, + letters and colons are allowed. + [% ELSIF error == "invalid_format" %] [% title = "Invalid Format" %] The format "[% format FILTER html %]" is invalid (must be one of