[
https://issues.apache.org/jira/browse/CB-964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14155776#comment-14155776
]
Jesse MacFadyen commented on CB-964:
------------------------------------
Test case :
{code}
window.onerror = function (msg, fn, ln) {
console.log("error : " + msg + " file: " + fn + "ln:" + ln);
};
window.addEventListener("callbackerror", function (err) {
console.log("got a callback error ! " + err.message);
});
window.requestFileSystem(LocalFileSystem.TEMPORARY,0,
function (res) {
throw new Error("WTF success");
},
function (err) {
throw new Error("WTF error");
}
);
Error in Success callbackId: File1241920647 : Error: WTF success
A first chance exception of type 'System.SystemException' occurred in
Microsoft.Phone.Interop.ni.dll
An exception of type 'System.SystemException' occurred in
Microsoft.Phone.Interop.ni.dll and wasn't handled before a managed/native
boundary
ERROR: Exception in InvokeScriptCallback :: An unknown error has occurred.
Error: 80020101.
error : WTF success file: x-wmapp0:www/cordova.jsln:303
{code}
> Error in success callback should generate event
> -----------------------------------------------
>
> Key: CB-964
> URL: https://issues.apache.org/jira/browse/CB-964
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaJS
> Affects Versions: 1.9.0
> Reporter: Kamen Kanchev
> Assignee: Jesse MacFadyen
>
> Error in success callback should generate a document event. This is important
> when loading, since for example an error occurs while deviceready. There is a
> try-catch statement in the CordovaJS, hence window.onerror() is not detecting
> the error.
> For example, Sencha Touch 2 fails to load because of localstorage corruption
> while loading, an the app crashes. A possible fix in this case is to clear
> the local storage and to window.location.reload();
> it is very east to fix this one - just add:
> fireDocumentEvent("CDVSuccessCallbackError");
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)