displaying timeout message not force close the app
<p>I want to display a timeout message to user not force close the application</p>

<p>this is my code </p>

<pre><code>String xml = null;

BasicHttpParams params = new BasicHttpParams();
ConnManagerParams.setTimeout(params, 1000);
HttpConnectionParams.setConnectionTimeout(params, 5000);
HttpConnectionParams.setSoTimeout(params, 5000);

// defaultHttpClient
DefaultHttpClient httpClient = new DefaultHttpClient(params);
HttpPost httpPost = new HttpPost(url);

try {
    HttpResponse httpResponse = httpClient.execute(httpPost);
    HttpEntity httpEntity = httpResponse.getEntity();
    xml = EntityUtils.toString(httpEntity);
} catch (UnsupportedEncodingException e) {
    //e.printStackTrace();
} catch (ClientProtocolException e) {
    //e.printStackTrace();
} catch (IOException e) {
    //e.printStackTrace();
}finally{
    httpClient.getConnectionManager().shutdown();
}
return xml;
</code></pre>

<p>if the connection timeout the app force close and give me this error :</p>

<pre><code>  org.apache.http.conn.ConnectTimeoutException: Connect to /xx.xx.xx.xx:xx timed out
</code></pre>
