title: Is there a way to catch Web console errors?
body: <p>Using WebView, certain websites take <strong>very long time</strong> to complete page load (as in <a href="http://developer.android.com/reference/android/webkit/WebViewClient.html#onPageFinished%28android.webkit.WebView,%20java.lang.String%29" rel="noreferrer">WebViewClient.onPageFinished()</a>) and, when that happens, this is characterize by Web Console errors of the following type:</p>
  
  <pre><code>E/Web Console(1916): Unsafe JavaScript attempt to access frame with URL
    http://mobile.example.com from frame with URL 
    http://ad.doubleclick.net/adi/interactive.example.com/front_sub;sz=320x50;ord=7340930261983.
    Domains, protocols and ports must match.
    05-26 10:44:15.274: E/Web Console(1916):  at null:1
  </code></pre>
  
  <p>I would like to be able to catch those errors and handle them in some way. e.g. issue a message or anything relevant to my app, actual handling is irrelevant at this point to the core question:</p>
  
  <p>Is there a way to catch those errors? i.e. in a way that my app can be notified?</p>
  
  <p><strong>Note:</strong> This is not a Javascript question. I am not programming a website. I am accessing an <em>existing</em> website whose implementation is beyond my control. This is a <a href="http://en.wikipedia.org/wiki/WebKit" rel="noreferrer">WebView</a> question (currently in the Android environment, but could be in other environments which are capable of hosting WebView as well).</p>