diff options
author | 2012-11-12 18:46:48 +0100 | |
---|---|---|
committer | 2012-11-12 18:46:48 +0100 | |
commit | 2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461 (patch) | |
tree | 0267c67f18e8099384bc7ae15f58a4459ed71f63 /report.cgi | |
parent | Fix the indentation (diff) | |
download | bugzilla-2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461.tar.gz bugzilla-2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461.tar.bz2 bugzilla-2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461.zip |
Bug 676844: Replace ThrowCodeError() by ThrowUserError() when the error is not triggered by the code itself
r=glob a=LpSolit
Diffstat (limited to 'report.cgi')
-rwxr-xr-x | report.cgi | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/report.cgi b/report.cgi index e0e141605..de587f143 100755 --- a/report.cgi +++ b/report.cgi @@ -110,11 +110,11 @@ my $width = $cgi->param('width') || 1024; my $height = $cgi->param('height') || 600; (detaint_natural($width) && $width > 0) - || ThrowCodeError("invalid_dimensions"); + || ThrowUserError("invalid_dimensions"); $width <= 2000 || ThrowUserError("chart_too_large"); (detaint_natural($height) && $height > 0) - || ThrowCodeError("invalid_dimensions"); + || ThrowUserError("invalid_dimensions"); $height <= 2000 || ThrowUserError("chart_too_large"); my $formatparam = $cgi->param('format') || ''; @@ -131,7 +131,7 @@ if ($formatparam eq "table") { } else { if (!Bugzilla->feature('graphical_reports')) { - ThrowCodeError('feature_disabled', { feature => 'graphical_reports' }); + ThrowUserError('feature_disabled', { feature => 'graphical_reports' }); } if ($row_field && !$col_field) { @@ -147,13 +147,13 @@ my $valid_columns = Bugzilla::Search::REPORT_COLUMNS; # Validate the values in the axis fields or throw an error. !$row_field || ($valid_columns->{$row_field} && trick_taint($row_field)) - || ThrowCodeError("report_axis_invalid", {fld => "x", val => $row_field}); + || ThrowUserError("report_axis_invalid", {fld => "x", val => $row_field}); !$col_field || ($valid_columns->{$col_field} && trick_taint($col_field)) - || ThrowCodeError("report_axis_invalid", {fld => "y", val => $col_field}); + || ThrowUserError("report_axis_invalid", {fld => "y", val => $col_field}); !$tbl_field || ($valid_columns->{$tbl_field} && trick_taint($tbl_field)) - || ThrowCodeError("report_axis_invalid", {fld => "z", val => $tbl_field}); + || ThrowUserError("report_axis_invalid", {fld => "z", val => $tbl_field}); my @axis_fields = grep { $_ } ($row_field, $col_field, $tbl_field); |