}
else
{
- ThrowCodeError("unknown_action", { action => $action });
+ ThrowUserError('unknown_action', {action => $action});
}
exit;
# We add or remove bugs based on the action choosen.
my $action = trim($cgi->param('action') || '');
$action =~ /^(add|remove)$/
- || ThrowCodeError('unknown_action', {'action' => $action});
+ || ThrowUserError('unknown_action', {action => $action});
# If we are removing bugs, then we must have an existing
# saved search selected.
print $cgi->redirect(-location => correct_urlbase() . "query.cgi?format=create-series$url");
}
else {
- ThrowCodeError("unknown_action");
+ ThrowUserError('unknown_action', {action => $action});
}
exit;
# No valid action found
#
-ThrowCodeError("action_unrecognized", {action => $action});
+ThrowUserError('unknown_action', {action => $action});
exit;
}
-#
# No valid action found
-#
-ThrowUserError('no_valid_action', {'field' => "component"});
+ThrowUserError('unknown_action', {action => $action});
|| ThrowTemplateError($template->error());
}
else {
- ThrowUserError('no_valid_action', {'field' => 'custom_field'});
+ ThrowUserError('unknown_action', {action => $action});
}
elsif ($action eq 'delete') { deleteType($token); }
elsif ($action eq 'deactivate') { deactivate($token); }
else {
- ThrowCodeError("action_unrecognized", { action => $action });
+ ThrowUserError('unknown_action', {action => $action});
}
exit;
exit;
}
-
-#
# No valid action found
-#
-
-ThrowCodeError("action_unrecognized", $vars);
-
+ThrowUserError('unknown_action', {action => $action});
# Helper sub to handle the making of changes to a group
sub doGroupChanges {
exit;
}
-ThrowCodeError("action_unrecognized", $vars);
+ThrowUserError('unknown_action', {action => $action});
exit;
}
-#
# No valid action found
-#
-ThrowUserError('no_valid_action', {'field' => "target_milestone"});
+ThrowUserError('unknown_action', {action => $action});
exit;
}
-#
# No valid action found
-#
-
-ThrowUserError('no_valid_action', {field => "product"});
+ThrowUserError('unknown_action', {action => $action});
###########################################################################
} else {
- $vars->{'action'} = $action;
- ThrowCodeError('action_unrecognized', $vars);
+ ThrowUserError('unknown_action', {action => $action});
}
exit;
display_field_values($vars);
}
-
-#
# No valid action found
-#
-# We can't get here without $field being defined --
-# See the unless($field) block at the top.
-ThrowUserError('no_valid_action', { field => $field } );
+ThrowUserError('unknown_action', {action => $action});
exit;
}
-#
# No valid action found
-#
-ThrowUserError('no_valid_action', {'field' => "version"});
+ThrowUserError('unknown_action', {action => $action});
load_template('comment', 'workflow_updated');
}
else {
- ThrowCodeError("action_unrecognized", {action => $action});
+ ThrowUserError('unknown_action', {action => $action});
}
# No valid action found
else {
Bugzilla->login(LOGIN_OPTIONAL);
- ThrowCodeError('unknown_action', {action => $action});
+ ThrowUserError('unknown_action', {action => $action});
}
# Display the template
$vars->{'data'} = \@image_data;
}
else {
- ThrowCodeError("unknown_action", {action => $cgi->param('action')});
+ ThrowUserError('unknown_action', {action => $action});
}
my $format = $template->get_format("reports/report", $formatparam,
[% DEFAULT title = "Internal Error" %]
[% error_message = BLOCK %]
- [% IF error == "action_unrecognized" %]
- [% docslinks = {'query.html' => "Searching for $terms.bugs",
- 'query.html#list' => "$terms.Bug lists"} %]
- I don't recognize the value (<em>[% action FILTER html %]</em>)
- of the <em>action</em> variable.
-
- [% ELSIF error == "attachment_local_storage_disabled" %]
+ [% IF error == "attachment_local_storage_disabled" %]
[% title = "Local Storage Disabled" %]
You cannot store attachments locally. This feature is disabled.
[% ELSIF error == "undefined_field" %]
Form field [% field FILTER html %] was not defined.
- [% ELSIF error == "unknown_action" %]
- [% IF action %]
- Unknown action [% action FILTER html %]!
- [% ELSE %]
- I could not figure out what you wanted to do.
- [% END %]
-
[% ELSIF error == "unknown_method" %]
The requested method '[% method FILTER html %]' was not found.
Either no products have been defined to enter [% terms.bugs %] against or you have not
been given access to any.
- [% ELSIF error == "no_valid_action" %]
- [% title = "No valid action specified" %]
- Cannot edit [% field_descs.$field FILTER html %]: no valid action was specified.
-
[% ELSIF error == "number_not_numeric" %]
[% title = "Numeric Value Required" %]
The value '[% num FILTER html %]' in the
[% END %]
token too recently to request another. Please wait a while and try again.
+ [% ELSIF error == "unknown_action" %]
+ [% IF action %]
+ Unknown action [% action FILTER html %]!
+ [% ELSE %]
+ I could not figure out what you wanted to do.
+ [% END %]
+
[% ELSIF error == "unknown_keyword" %]
[% title = "Unknown Keyword" %]
<code>[% keyword FILTER html %]</code> is not a known keyword.
# Throw an error if the form does not contain an "action" field specifying
# what the user wants to do.
-$action || ThrowCodeError("unknown_action");
+$action || ThrowUserError('unknown_action');
# If a token was submitted, make sure it is a valid token that exists in the
# database and is the correct type for the action being taken.
} elsif ($action eq 'cancel_new_account') {
cancel_create_account($token);
} else {
- # If the action that the user wants to take (specified in the "a" form field)
- # is none of the above listed actions, display an error telling the user
- # that we do not understand what they would like to do.
- ThrowCodeError("unknown_action", { action => $action });
+ ThrowUserError('unknown_action', {action => $action});
}
exit;
$cgi->param('id', 'voting/user.html');
}
else {
- ThrowCodeError("unknown_action", {action => $action});
+ ThrowUserError('unknown_action', {action => $action});
}
print $cgi->redirect('page.cgi?' . $cgi->query_string);