ClientProtocolException is subclass of IOException. You don't need two "catchs"