You don't really know which exception is thrown, do you?
I recommend using beta2, it should also display the detailed exception string. But you can get information about why the connection failed via HostAddress.getException() versions prior beta2 too.
It's usually a NetworkOnMainThreadException.