无法捕获的webview异常?

时间:2012-09-04 20:00:37

标签: android

我想清除我应用中的所有网页视图数据。我正在做以下事情:

WebViewDatabase wvd = WebViewDatabase.getInstance(context);
if (wvd != null) {
    try { 
        wvd.clearUsernamePassword(); <-- throws an uncatchable exception
    } catch (Exception ex) {
        Log.e(TAG, "nope!", ex);
    }
}

clearUsernamePassword()行抛出一个异常,并且它没有被上面的try / catch捕获:

native_execute (step): errno = 2, error message = No such file or directory, handle = 0x47ec78
clearUsernamePassword Storage full, abort doing SQLite operation.
android.database.sqlite.SQLiteDiskIOException: error code 10: disk I/O error
  at android.database.sqlite.SQLiteStatement.native_execute(Native Method)
  at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:61)
  at android.database.sqlite.SQLiteDatabase.delete(SQLiteDatabase.java:1721)
  at android.webkit.WebViewDatabase.clearUsernamePassword(WebViewDatabase.java:1278)

我们应该在这做什么?

由于

--------更新---------

这是导致它的方法的链接(它不是我的,它是android的一部分): http://developer.android.com/reference/android/webkit/WebViewDatabase.html#clearUsernamePassword()

我实际上从WebViewDatabase的不同方法得到了一些这样的例外(该应用程序有很多下载,因此我看到的是高容量。我实际上能够最终在设备上重现这一点。)

以上代码不是在单独的线程上运行。

0 个答案:

没有答案
相关问题