views:

29

answers:

1

I have this simple HTML that I load into an Android WebView (SDK version 1.5)-

<html>
<body onload="nomethod()">
<h1>Hello World</h1>
</body>
</html>

Function nomethod() doesn't exist but the LogCat doesn't display any error.
It seems that any exception that isn't caught cannot be traced.
Any idea how can I handle or trace uncaught exceptions?

Thanks!

+1  A: 

You might be able to get that if you register a WebChromeClient with your WebView. In particular, look at onConsoleMessage().

CommonsWare
Thanks, But its available only from API 7 - Android 2.1 ...
Totach
That would explain why I didn't remember it... :-)
CommonsWare