1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 14:02:06 +01:00

Improved Javadocs and error handling code on join method.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2083 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-09-11 21:13:20 +00:00 committed by mtucker
parent ba6521df0d
commit 3564612171

View file

@ -153,10 +153,12 @@ public class GroupChat {
* another nickname, will leave as that name first before joining under the new
* name.
*
* @param nickname the nicknam to use.
* @param nickname the nickname to use.
* @param timeout the number of milleseconds to wait for a reply from the
* group chat that joining the room succeeded.
* @throws XMPPException if an error occurs joining the room.
* @throws XMPPException if an error occurs joining the room. In particular, a
* 409 error can occur if someone is already in the group chat with the same
* nickname.
*/
public synchronized void join(String nickname, long timeout) throws XMPPException {
if (nickname == null || nickname.equals("")) {
@ -184,8 +186,7 @@ public class GroupChat {
throw new XMPPException("No response from server.");
}
else if (presence.getError() != null) {
throw new XMPPException(presence.getError().getMessage());
throw new XMPPException(presence.getError());
}
this.nickname = nickname;
joined = true;