incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtan...@gmail.com
Subject Re: [jira] [Created] (CB-1364) Errors not logged currently - use window.onerror in templates/cordova.js to expose them
Date Mon, 03 Sep 2012 12:58:50 GMT
Can we add it with addEventListener instead?

Or do we want something that can be replaced by the user?
------Original Message------
From: Ville M. Vainio (JIRA)
To: callback-dev@incubator.apache.org
ReplyTo: callback-dev@incubator.apache.org
Subject: [jira] [Created] (CB-1364) Errors not logged currently - use window.onerror in templates/cordova.js
to expose them
Sent: Sep 3, 2012 7:37 AM

Ville M. Vainio created CB-1364:
-----------------------------------

             Summary: Errors not logged currently - use window.onerror in templates/cordova.js
to expose them
                 Key: CB-1364
                 URL: https://issues.apache.org/jira/browse/CB-1364
             Project: Apache Cordova
          Issue Type: Improvement
          Components: App Hello World, WP7
    Affects Versions: 2.0.0
         Environment: Visual studio 2010 Express for Windows Phone, WP7 emulator
            Reporter: Ville M. Vainio
            Assignee: Michael Brooks


Currently, you don't get any information on javascript errors (trying to access undefined
attributes, etc).

At least on WP7 version of the phonegap, window.onerror works and gives you useful information.
I ran this and started to get my errors logged properly:

        window.onerror = function() {
         console.log ("Error: " + JSON.stringify(arguments));         
        }

Something like this should come out of the box, either in cordova.js or in the quickstart
template. It's not obvious to most developers that something like window.onerror is even available,
since most are used to getting this information in web inspector / firebug console.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Sent on the TELUS Mobility network with BlackBerry
Mime
View raw message