title: How to handle exception when web service is not available in java
body: <p>I need to handle an exception when web service is not available. In my app i am requesting an web service what will return me an XML data. My app is working correctly when web service is available. But when the web service is unavailable then my app become crash.how to catch that exception in java. Please note that i am developing an app for android.</p>
  
  <p>when the web service is unavailable the it looks likes the following image
  <img src="https://i.stack.imgur.com/43OBL.png" alt="enter image description here"></p>