{ "id": "104321", "key": "TIMOB-11652", "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": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14621", "description": "2012 Sprint 23 API", "name": "2012 Sprint 23 API", "archived": true, "released": true, "releaseDate": "2012-11-19" }, { "id": "14623", "description": "2012 Sprint 23 JS", "name": "2012 Sprint 23", "archived": true, "released": true, "releaseDate": "2012-11-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-01-16T10:19:40.000+0000", "created": "2012-11-02T17:16:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "exception", "qe-port", "triage" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "22488", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "104324", "key": "TIMOB-11653", "fields": { "summary": "Android: Add script errors/stack trace to TiExceptionHandler data", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "38804", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "132549", "key": "TIMOB-17268", "fields": { "summary": "TiAPI: Make call stack available through Error.prototype.stack property", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-07-06T20:11:52.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": "12305", "name": "Core", "description": "Central component of the Platform (outside of Tooling, or platform specific implementation details)" } ], "description": "JavaScript:\r\n{code}\r\n// Without try catch:\r\nvar err = new Error(\"My Awesome Caught Error!\");\r\nAPI.logHandledException(err);\r\n\r\ntry {\r\nvar err = new Error(\"My Awesome Caught Error!\");\r\nthrow err\r\n\r\n} catch (err){\r\nAPI.logHandledException(err);\r\n}\r\n{code}\r\n\r\nObjective-C:\r\n{code}\r\n-(void)logHandledException:(id)args\r\n{\r\n TiLogMessage([NSString stringWithFormat:@\"class type?: %@\", [[args objectAtIndex:0] class]]); // This returns as NSDictionary, is this expected?\r\n\r\n// TiScriptError *exception = [TiScriptError initWithDictionary:[args objectAtIndex:0]]; // This selector doesn't exist?\r\n TiScriptError *exception = (TiScriptError *)args; // Returns an array, not a single object. In other methods, they returned the objects rather than an array of parameters.\r\n\r\n[API logHandledException:[self convertScriptErrorToNative:exception]];\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Add script errors/stack trace to TiExceptionHandler data", "creator": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "234510", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening so that we can bring TiJSCore in. Also, documentation.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-15T19:55:57.000+0000", "updated": "2013-01-15T19:55:57.000+0000" }, { "id": "236083", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "A test case:\n{code}\nvar win1 = Titanium.UI.createWindow({ backgroundColor:'#fff' });\n \nvar accessor = {};\naccessor.buildEmailView = function(to, subject, defaultBody) {\n \n var emailDialog = Ti.UI.createEmailDialog();\n emailDialog.setSubject(subject);\n emailDialog.setToRecipients(to);\n emailDialog.setMessageBody(defaultBody);\n emailDialog.setHtml(true);\n emailDialog.setBarColor('#312f2c');\n \n emailDialog.open();\n \n emailDialog.addEventListener('complete',function(e)\n {\n if (e.result == emailDialog.SENT)\n {\n alert(\"message was sent\");\n }\n else\n {\n alert(\"message was not sent. result = \"+e.result);\n }\n });\n \n};\naccessor.buildEmailView(/* to */ 'email@appc.com', /* subject */ 'Testing', /* defaultBody */ 'DefaultBody');\n \nwin1.open();\n{code}\n\nOutput will be something like:\n{code}\n[ERROR] Script Error {\n backtrace = \"#0 () at file://localhost/Users/max/Library/Application%20Support/iPhone%20Simulator/4.3.2/Applications/86EAB896-F4E9-4672-9426-D20F7FAED5F1/Titanium.app/app.js:29\";\n line = 13;\n message = \"Invalid type passed to function\";\n nativeLocation = \"-[TiUIEmailDialogProxy open:] (TiUIEmailDialogProxy.m:63)\";\n nativeReason = \"expected: NSArray or nil, was: NSCFString\";\n sourceId = 208722560;\n sourceURL = \"file://localhost/Users/max/Library/Application%20Support/iPhone%20Simulator/4.3.2/Applications/86EAB896-F4E9-4672-9426-D20F7FAED5F1/Titanium.app/app.js\";\n}\n{code}\n\nThe expected result should contain valid 'backtrace' property:value pair.\n", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-26T01:03:09.000+0000", "updated": "2013-01-26T01:03:09.000+0000" }, { "id": "236091", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing.\nTested and verified fix with:\nDevice:\niPhone5 iOS 6.0\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK, build: 3.0.2.v20130125153221\nTitanium SDK, build:3.1.0.v20130125152545\n\nSimilar output.\n\n\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-26T01:34:16.000+0000", "updated": "2013-01-26T01:34:16.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }