1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-04 15:45:58 +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) { public void setAnswer(String variable, String value) {
if (!isSubmitType()) { 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); FormField field = getField(variable);
if (field != null) { if (field != null) {
@ -173,7 +174,8 @@ public class Form {
*/ */
public void setAnswer(String variable, List values) { public void setAnswer(String variable, List values) {
if (!isSubmitType()) { 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); FormField field = getField(variable);
if (field != null) { if (field != null) {