powered by Jive Software

Smack: StanzaError should have a way to give human-readable error messages


#1

The StanzaError.toString() call will yield a string like “XMPPError: not-allowed - cancel”

This is suitable for internal logging, but it would be great to have a method that returns a human-readable string for the actual error cause, which can be shown in an XMPP client. It should include the <text> element of the error if provided, or an understandable representation of the technical enums otherwise.


#2

That sounds in general like a good idea.

I wonder how a good API would look like, e.g. would the method take a language parameter to show the best matching language? How to determine the “best matching” language?

Not sure if this is feasible, but if it is, then it would sure be great.