powered by Jive Software

Better error display for `ConnectionException`


Most of the SmackException error messages are useful and short, however the ConnectionException message contains a list of all host failures, which each might contain a list of DNS failures, which then…

Edit: image embedding is broken for $reasons, direct link to image: https://op-co.de:5281/upload/taWz_q4oIVlVkjGz/Screenshot_20181201-095957_yaxim.jpg

I know that making good error messages is a science, and I’d like to have a one-liner that’s usable for debugging (screnshot sent to server admin). I’m thinking of something like the host/ip address and exception of the most recent attempt.

Currently I need to do something like this:

if (reason instanceof SmackException.ConnectionException)
	reason = ((SmackException.ConnectionException)reason).getFailedAddresses()