Android - WebViewClient
<p>I am trying to load URL inside a WebViewClient as below:</p>

<pre><code>webview.setWebViewClient(new WebViewClient()
{
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
             view.loadUrl(url);
             return true;
       }

    public void onPageFinished(WebView view, String url) 
       {
    }

     public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) 
      {
   }
 });

 webview.loadUrl(articleLink);
</code></pre>

<h2>Problem:</h2>

<p>Web URL is loading successfully but in some occurrence i got the following errors, at the same time i would like to display Alert Dialog instead of Webview with Error message.</p>

<p>So can you please let me know ,<strong>How do i handle the following kind of errors:</strong></p>

<ol>
<li>"Web page not available" error</li>
<li>"Directory listing Denied"</li>
</ol>

<p>I have attached the 2nd one's image for your reference:</p>

<p><img src="http://i.stack.imgur.com/ftD1i.png" alt="alt text"></p>
