1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-24 03:27:59 +01:00

Changed detailed error message in #setAnswer

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2291 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2004-04-11 13:46:59 +00:00 committed by gdombiak
parent 8e1dc03f9f
commit 3b585ba345

View file

@ -149,7 +149,8 @@ public class Form {
*/
public void setAnswer(String variable, String value) {
if (!isSubmitType()) {
throw new IllegalStateException("Cannot add fields if the form is not of type \"submit\"");
throw new IllegalStateException("Cannot set an answer if the form is not of type " +
"\"submit\"");
}
FormField field = getField(variable);
if (field != null) {
@ -173,7 +174,8 @@ public class Form {
*/
public void setAnswer(String variable, List values) {
if (!isSubmitType()) {
throw new IllegalStateException("Cannot add fields if the form is not of type \"submit\"");
throw new IllegalStateException("Cannot set an answer if the form is not of type " +
"\"submit\"");
}
FormField field = getField(variable);
if (field != null) {