English 中文(简体)
未由ORMLite处理过的阴道检查?
原标题:SQLiteExceptions not handled by ORMLite?

我特别谨慎地处理我的手表中来自ORMLite的所有飞弹,只是发现,在ORML的地下和甲状腺的泥q中,像仅仅不小心,就会出现一些暂时的例外情况。

是否有办法避免不得不处理 Android和OR塞?

这里的样本是从一种能够收集到QQQExceptions的方法中找到的,但显然并非是QQ。

E/AndroidRuntime( 7308): Caused by: android.database.sqlite.SQLiteException: unable to open database file
E/AndroidRuntime( 7308):    at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
E/AndroidRuntime( 7308):    at android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:1821)
E/AndroidRuntime( 7308):    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:817)
E/AndroidRuntime( 7308):    at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:851)
E/AndroidRuntime( 7308):    at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:844)
E/AndroidRuntime( 7308):    at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:544)
E/AndroidRuntime( 7308):    at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203)
E/AndroidRuntime( 7308):    at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:98)
E/AndroidRuntime( 7308):    at com.j256.ormlite.android.AndroidConnectionSource.getReadWriteConnection(AndroidConnectionSource.java:60)
E/AndroidRuntime( 7308):    at com.j256.ormlite.android.AndroidConnectionSource.getReadOnlyConnection(AndroidConnectionSource.java:50)
E/AndroidRuntime( 7308):    at com.j256.ormlite.stmt.StatementExecutor.buildIterator(StatementExecutor.java:189)
E/AndroidRuntime( 7308):    at com.j256.ormlite.stmt.StatementExecutor.query(StatementExecutor.java:153)
E/AndroidRuntime( 7308):    at com.j256.ormlite.dao.BaseDaoImpl.query(BaseDaoImpl.java:245)
E/AndroidRuntime( 7308):    at com.j256.ormlite.stmt.QueryBuilder.query(QueryBuilder.java:250)
E/AndroidRuntime( 7308):    at au.com.ninthavenue.android.notes.application.TagsEM.getRecentTags(TagsEM.java:229)
E/AndroidRuntime( 7308):    at au.com.ninthavenue.android.notes.activities.EditNote.loadTags(EditNote.java:257)
E/AndroidRuntime( 7308):    at au.com.ninthavenue.android.notes.activities.EditNote.onCreate(EditNote.java:119)
最佳回答

I m not sure what the proper answer is here in terms of proper ways to catch multiple exceptions, but I see it as a bug in ORMLite. In most places (obviously not all) ORMLite tries to wrap the Android calls to catch and re-throw these exceptions as java.sql.SQLExceptions. I ve changed the code in AndroidConnectionSource checked into trunk to be the following:

SQLiteDatabase db;
try {
    db = helper.getWritableDatabase();
} catch (android.database.SQLException e) {
    throw SqlExceptionUtil.create("Unable to get writable database", e);
}
connection = new AndroidDatabaseConnection(db, true);

I ve 向跟踪器添加这一bug,并在固定装置上检查到renk。 时间为4.34。 让我知道,你是否发现其他地方是ORMLite,没有适当地总结这些例外。

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签