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:
parent
8e1dc03f9f
commit
3b585ba345
1 changed files with 4 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue