You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/03/10 19:19:43 UTC

[jira] [Commented] (CB-2528) Add window.onerror to index.html

    [ https://issues.apache.org/jira/browse/CB-2528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13925994#comment-13925994 ] 

ASF GitHub Bot commented on CB-2528:
------------------------------------

Github user jsoref commented on a diff in the pull request:

    https://github.com/apache/cordova-app-hello-world/pull/6#discussion_r10442330
  
    --- Diff: www/index.html ---
    @@ -37,6 +37,8 @@
             <script type="text/javascript" src="cordova.js"></script>
             <script type="text/javascript" src="js/index.js"></script>
             <script type="text/javascript">
    +            window.onerror = function (errorMsg, url, lineNumber) { alert("ERROR:" + errorMsg + ", " + url + ":" + lineNumber); };
    --- End diff --
    
    I'm not a fan of onerror -> alert() ... Anyone creating something which triggers an error on a timer is going to create a bunch of dialogs and that's a bad approach.
    
    I'm generally encouraging console.log( object-map )


> Add window.onerror to index.html
> --------------------------------
>
>                 Key: CB-2528
>                 URL: https://issues.apache.org/jira/browse/CB-2528
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: App Hello World
>            Reporter: Shazron Abdullah
>            Assignee: Michael Brooks
>            Priority: Minor
>
> https://twitter.com/purplecabbage/status/276506789065928704
> Tired of telling people to add this to debug their stuff.



--
This message was sent by Atlassian JIRA
(v6.2#6252)