{ "id": "61689", "key": "TIMOB-1057", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-07-25T12:43:24.000+0000", "created": "2011-04-15T02:42:45.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "issuelinks": [ { "id": "19395", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-26T22:25:12.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
a customer has reported that if there is a coding issue (i.e.\r\nmissing var) in an event listener, that error fails to be\r\nregistered in Developer. Following code shows this behavior.
\r\nvar i=0;
\r\ni.missingMethod();
appropriately logs the exception but
\r\nbtn.addEventListener('click', function() {
\r\nvar i=0;
\r\ni.missingMethod();
\r\n});
does not.
This is a threading issue, certainly. We don't catch and report\nexceptions that occur on some threads.
I hit this issue so often that I don't call addEventListener()\ndirectly anymore, and instead use:
\n\nvar listen = function(obj, event, cb) {\n obj.addEventListener(event, function (e) {\n try {\n cb(e);\n } catch (err) {\n alert(\"Error in callback: \" + err);\n }\n });\n};
\n
That's a great idea Damien; I'm embarrassed I never even thought\nof doing that. Keep forgetting how flexible Javascript is. Thanks!\nThat'll be a great duct-tape bandage until they fix this.