powered by Jive Software

NULL exception text

Hello all!

I try create new account with existing user name (for testing). I get exception of course but text is null.

Packets:

<?xml version=''1.0''?>

<stream:stream xmlns:stream=’‘http://etherx.jabber.org/streams’’ id=’‘3F8B03E0’’ xmlns=’‘jabber:client’’ from=’‘jabber.ru’’>

<iq id=’‘kvhz1-0’’ type=’‘result’’><query xmlns=’‘jabber:iq:register’’>

Choose a username and password to register with this server.

<iq id=’‘kvhz1-1’’ type=’‘error’’><query xmlns=’‘jabber:iq:register’’>qqqqqqqqqqqqq</pass word><error code=’‘409’’>Username Not Available


Is it a bug of smack or my error?

Code:

try {

accManager.createAccount(userName,userPsword);

}

catch (Exception e) {

Tools.showError(e.getMessage());

cancel();

}

Thanks.

Perhaps we need to improve the XMPPException class a bit. I can understand how it’'s a bit confusing at the moment. What you actually wan to do is:

catch (XMPPException xe) {
    XMPPError error = xe.getXMPPError();
    // Use the error code and possibly message here.
}

I’'ll change the XMPPException implementation so that the default exception message is the xmpp error.

Regards,

Matt