java.lang.RuntimeException: java.net.UnknownHostException: Host is unresolved:
<p>I am having a problem while parsing XML file,i used newsRSS parser as a reference.but i am getting this error in the real device.how to display an error message like alert for the user and let him stay on the app without crashing?</p>

<p>this is the peace of the code that do the connection and parsing:</p>

<pre><code>protected Config_Parser(String feedUrlString,Context context){
  this.context = context;
  try {
    this.feedUrl = new URL(feedUrlString);
  } catch (MalformedURLException e) {
    throw new RuntimeException(e);
  }
}
protected InputStream getInputStream() {
  try {
    return feedUrl.openConnection().getInputStream();
  } catch (IOException e) {
    Log.e("Error", "error happned");
    return null;
    //throw new RuntimeException(e);
  }
}
</code></pre>

<p>how may i handle this error with sending alert to the user without crashing or exiting the application?</p>

<p>Thanks for help :)</p>
