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:
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) {
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue