From 2a6f7d4663dfc5cb00c1bb8b8d8139869a22d461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Mon, 12 Nov 2012 18:46:48 +0100 Subject: Bug 676844: Replace ThrowCodeError() by ThrowUserError() when the error is not triggered by the code itself r=glob a=LpSolit --- editkeywords.cgi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'editkeywords.cgi') diff --git a/editkeywords.cgi b/editkeywords.cgi index 7e14f80cd..5a7f6643b 100755 --- a/editkeywords.cgi +++ b/editkeywords.cgi @@ -97,7 +97,7 @@ if ($action eq 'new') { if ($action eq 'edit') { my $keyword = new Bugzilla::Keyword($key_id) - || ThrowCodeError('invalid_keyword_id', { id => $key_id }); + || ThrowUserError('invalid_keyword_id', { id => $key_id }); $vars->{'keyword'} = $keyword; $vars->{'token'} = issue_session_token('edit_keyword'); @@ -116,7 +116,7 @@ if ($action eq 'edit') { if ($action eq 'update') { check_token_data($token, 'edit_keyword'); my $keyword = new Bugzilla::Keyword($key_id) - || ThrowCodeError('invalid_keyword_id', { id => $key_id }); + || ThrowUserError('invalid_keyword_id', { id => $key_id }); $keyword->set_all({ name => scalar $cgi->param('name'), @@ -140,7 +140,7 @@ if ($action eq 'update') { if ($action eq 'del') { my $keyword = new Bugzilla::Keyword($key_id) - || ThrowCodeError('invalid_keyword_id', { id => $key_id }); + || ThrowUserError('invalid_keyword_id', { id => $key_id }); $vars->{'keyword'} = $keyword; $vars->{'token'} = issue_session_token('delete_keyword'); @@ -154,7 +154,7 @@ if ($action eq 'del') { if ($action eq 'delete') { check_token_data($token, 'delete_keyword'); my $keyword = new Bugzilla::Keyword($key_id) - || ThrowCodeError('invalid_keyword_id', { id => $key_id }); + || ThrowUserError('invalid_keyword_id', { id => $key_id }); $keyword->remove_from_db(); -- cgit v1.2.1