You need to make sure the second argument passed to
Log.e
isn't null.
One way to do that would be to inspect
e.getMessage()
and log something else if it is null;
try {
Socket s = new Socket(IPAddress,PORT);
} catch(Exception e){
String message = e.getMessage() == null ? e.toString() : e.getMessage();
Log.e("Exception", e.getMessage());
}
Hope this helps,
Fredrik