{ "id": "132549", "key": "TIMOB-17268", "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": [], "resolution": null, "resolutiondate": null, "created": "2014-07-03T00:27:42.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "38804", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "104321", "key": "TIMOB-11652", "fields": { "summary": "iOS: 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": "38803", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "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 } } } } ], "assignee": null, "updated": "2018-02-28T20:03:12.000+0000", "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" } }, "components": [ { "id": "12305", "name": "Core", "description": "Central component of the Platform (outside of Tooling, or platform specific implementation details)" } ], "description": "h2. problem\r\n\r\nI want to have access to the call stack via the non-standard [Error.prototype.stack|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack] property. While non-standard, it is available in most browsers and in node.js as well. \r\n\r\nThe primary reason for this ticket is that the absence of this property implemented for all platforms causes vague error output with ti-mocha, or any unit testing library that relies on {{Error.prototype.stack}} for its stack trace, which is most of them. Aside from this, though, it would just make debugging, testing, and customized error output so much easier.\r\n\r\nh2. test case \r\n\r\n{code:javascript}\r\nfunction foo() {\r\n\tfunction bar() {\r\n\t\tconsole.log(new Error().stack);\r\n\t}\r\n\tbar();\r\n}\r\nfoo();\r\n{code}\r\n\r\nh2. expected\r\n\r\nIn the above test case, I would expect that the complete stack trace would be printed to the console. For example, in node.js, the exact same code would result in the following:\r\n\r\n{code}\r\n≫ node test.js \r\nError\r\n at bar (/Users/tlukasavage/development/ti-stack/test.js:3:15)\r\n at foo (/Users/tlukasavage/development/ti-stack/test.js:5:2)\r\n at Object. (/Users/tlukasavage/development/ti-stack/test.js:7:1)\r\n at Module._compile (module.js:456:26)\r\n at Object.Module._extensions..js (module.js:474:10)\r\n at Module.load (module.js:356:32)\r\n at Function.Module._load (module.js:312:12)\r\n at Function.Module.runMain (module.js:497:10)\r\n at startup (node.js:119:16)\r\n at node.js:906:3\r\n{code}\r\n\r\nh2. actual\r\n\r\nThe output is {{null}} on iOS and Android. I have no tested our other supported platforms.", "attachment": [], "flagged": false, "summary": "TiAPI: Make call stack available through Error.prototype.stack property", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "All platforms \r\nAll versions of TItanium", "comment": { "comments": [ { "id": "312458", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Does this relate to the two linked issues? Can we just hook those up here?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-06T20:12:09.000+0000", "updated": "2014-07-06T20:12:09.000+0000" }, { "id": "336310", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm not certain, those linked issues don't seem to be the exact same thing. Mine is basically asking for this to be implemented: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack\r\n\r\nWhile it is cited as non-standard, it is implemented in node.js and is exceedingly helpful.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-15T01:42:32.000+0000", "updated": "2014-12-15T01:42:32.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }