[ 
https://issues.apache.org/jira/browse/CB-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joe Bowser updated CB-191:
--------------------------


OK, openOrCreateDatabase doesn't seem to throw anything.  We can put a 
try/catch around it for your use case, but we really need more information 
about what you're asking here, since we're almost completely asynchronous 
except when trying to emulate the WebSQL API that Google doesn't want you to 
have.
                
> Exception handling for synchronous plugin calls
> -----------------------------------------------
>
>                 Key: CB-191
>                 URL: https://issues.apache.org/jira/browse/CB-191
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.2.0
>            Reporter: pboon
>            Priority: Minor
>
> We received user reports about our application crashing with the stack trace 
> below. Looking at the source code of PluginManager.java, it looks like for 
> synchronous calls no exception handling is performed (contrary to async calls 
> where the error callback is called in case of an exception).
> Since Android 1.x is not supported, we should be able to solve this specific 
> case by making sure no fallback is performed if the original 
> openDatabase(_orig) throws a (javascript) exception.
> android.database.sqlite.SQLiteException: unable to open database file
> at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
> at android.database.sqlite.SQLiteDatabase.<init>
> (SQLiteDatabase.java:1849)
> at
> android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
> at
> android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:854)
> at com.phonegap.Storage.openDatabase(Storage.java:164)
> at com.phonegap.Storage.execute(Storage.java:72)
> at com.phonegap.api.PluginManager.exec(PluginManager.java:171)
> at com.phonegap.DroidGap$GapClient.onJsPrompt(DroidGap.java:1070)
> at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:581)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to