{ "id": "140650", "key": "TIMOB-18103", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-06-04T01:09:34.000+0000", "created": "2014-11-27T03:03:33.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "error", "handling" ], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-16T22:44:53.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": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h1. The Problem\r\nWhen an unhandled error occurs in production (or in builds distributed to testers), the error is either completely lost, or is displayed in a rather unfriendly red dialog. This includes both native and JavaScript errors.\r\n\r\nh2. Desired Solution\r\nLet the developer receive errors in their JavaScript. They can then do whatever they want with the error, such as logging it, or displaying a dialog to the user. These errors should be sent regardless of if the app is running in production or not.\r\n\r\nh2. Example\r\n{code}Ti.App.addEventListener('uncaughtException', function(evt) {\r\n\talert({\r\n\t\t// Both iOS and Android:\r\n\t\tmessage: evt.message,\r\n\t\tline: evt.line,\r\n\r\n\t\t// iOS Only:\r\n\t\tsourceId: evt.sourceId,\r\n\t\ttype: evt.type,\r\n\t\tsourceURL: evt.sourceURL,\r\n\t\tbacktrace: String(evt.backtrace).substr(0, 100) + '...',\r\n\r\n\t\t// Android Only:\r\n\t\ttitle: evt.title,\r\n\t\tsourceName: evt.sourceName,\r\n\t\tlineSource: evt.lineSource,\r\n\t\tlineOffset: evt.lineOffset\r\n\t});\r\n});\r\n\r\nthrow new Error('Hello, error handler!');{code}", "attachment": [], "flagged": false, "summary": "Generic Error Handling", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 407, "state": "closed", "name": "2015 Sprint 11 SDK", "startDate": "2015-05-23T00:00:08.253Z", "endDate": "2015-06-06T00:00:00.000Z", "completeDate": "2015-06-08T16:18:16.381Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "333980", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "PR for Android and iOS implementation of example solution:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/6407", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2014-11-27T03:18:09.000+0000", "updated": "2014-11-27T03:18:09.000+0000" }, { "id": "354302", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "CR and FT passed. PR Merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-06-04T01:09:02.000+0000", "updated": "2015-06-04T01:09:02.000+0000" }, { "id": "413417", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-16T22:44:53.000+0000", "updated": "2017-03-16T22:44:53.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }