Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 12162

Re: RFC: Reworking the Exceptions of connect() and login()

$
0
0

Daniele Ricci wrote:

 

Hi, I think that defining an exception as temporary is a prerogative of the developer. I mean of course an exception can be temporary or permanent, but I think it's more of a semantic issue. I decide (based on what the exception is) whether an error is permanent or temporary. This is the kind of control a software library should have: do not suggest logic, rather provide tools to implement logic and let the developer decide. All of this IMHO.

If Smack would, no matter how it's implemented (methods/subclass), categorize exceptions in temporary or not, then it doesn't mean that the user has to follow that decision. It's just a common problem that every Smack user needs to solve, and providing the user with a good and sane default *is* exaclty what a library should do. This means shifting work from the user to the library. But we won't enforce anything, if the user decides to handle an exception differently, he/she is free to do so.

 

Could you elaborate Stanza and Stream errors? Maybe with some examples? Does it, and if so, how, compares to Smack's XMPPError?

 

Oh, and I've heard no argument until now, *why* it's cool to use the intial exception (IOException, …) instead of wrapping it into XmppException. Would be happy to hear some.


Viewing all articles
Browse latest Browse all 12162

Trending Articles