title: How to handle errors inside webview?
body: <p>I want to load a webpage.</p>
  
  <pre><code>private class MyJavaScriptInterface {
  
      private MyJavaScriptInterface () {
      }
  
      public void setHtml(String contentHtml) {
  
          if (contentHtml != null &amp;&amp; contentHtml.trim().length() &gt; 0) {
              //Do something
          }
      }
  }
  private WebViewClient webViewClient = new WebViewClient() {
  
      @Override
      public void onPageFinished(WebView view, String url) {
  
          view.loadUrl("javascript:window.ResponseChecker.setHtml"
              + "(document.body.innerHTML);");
          if (progressDialog != null &amp;&amp; progressDialog.isShowing()) {
              progressDialog.dismiss();
          }
      }
  
      public void onReceivedSslError(WebView view, SslErrorHandler handler,
          SslError error) {
          handler.proceed();
      }
  
      public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
          Log.e("ProcessPayment", "onReceivedError = " + errorCode);
      }
  
  };
  </code></pre>
  
  <p>I want to handle webpage loading errors. I know that the errors can be obtained in  <code>onReceivedError(...)</code> method.</p>
  
  <p>My problem is how  can I handle the error without showing <code>Page Not found</code> in webview? (eg: Show a  dialog and makes webview blank).</p>
  
  <p>Thanks in Advance.</p>