From 3b585ba345191a6607040c679865b47235d831af Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Sun, 11 Apr 2004 13:46:59 +0000 Subject: [PATCH] Changed detailed error message in #setAnswer git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2291 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smackx/Form.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/org/jivesoftware/smackx/Form.java b/source/org/jivesoftware/smackx/Form.java index 132b31aef..a797a5ea2 100644 --- a/source/org/jivesoftware/smackx/Form.java +++ b/source/org/jivesoftware/smackx/Form.java @@ -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) {