Don't catch Exception as it hides any possible cause of trouble in the user code.

For instance, I had caused a NullPointerException, but couldn't see where the problem was as it was caught by the catch(Exception e) in WebSocketClient. Now I'm only catching the required exceptions, leaving the others to the user to handle.