As an active user of SMACK, I'd like to add my 2¢ here:
@CSH: I like the idea of reusing existing generic exceptions, however the specific LoginExceptions from javax.security.auth.login are not available on Android, making my use-case more complicated to implement. Therefore, I would rather suggest having our own subclasses of LoginException.
I want to be able to abort automatic reconnects if the condition is not going to go away, i.e. if the user entered wrong credentials. I can see how this is a grey area with temporarily disabled logins, but I want to have all generic cases covered. I can imagine that IOException for everything connection-related, including timeouts, is the sane way to go here.
I know for sure that "network unreachable" and "unknown host" exceptions happen when the Android device is not connected to the Internet. The latter is reasonable to assume as permanent on a Desktop PC though.
@Daniele Ricci: I am not sure we can/should introduce StanzaExceptions, as the errors in parsing individual stanzas happen in the parser thread, not in the main thread when you call blocking functions. Therefore, the blocking functions like connect()/login() should never throw them anyway.
I am against adding an isTemporary() method to our own exceptions. It should become clear from the exception class what kind of exception it is, provided it can become clear at all.
@Flow: I really do not like SMACK wrapping everything into XMPPException, it would be much better if XMPPException would only cover stream errors, while connection errors are passed up as-is.