Login failed because of incorrect password?

Hello,

Is there a way to know if a login attempt has failed specifically because of an incorrect username/password match so I can notify the user or will Smack always just generate an exception?

If yes, how?

Thanks

Harry

Hello, I have found my answer. In case anyone finds it useful in the future connection.login() will not create an error if the wrong username or password is used; the error will occur when trying to communicate with the server e.g fetching the roster.

To notify the user of an incorrect password I have used connection.isAuthenticated() immediately after logging in.

Harry.