{"action":"created","issue":{"url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/194","labels_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/194/comments","events_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/194/events","html_url":"https://github.com/unexpectedjs/unexpected/pull/194","id":97259229,"number":194,"title":"Fix stack trace of errors propagated by expect.withError","user":{"login":"papandreou","id":373545,"avatar_url":"https://avatars.githubusercontent.com/u/373545?v=3","gravatar_id":"","url":"https://api.github.com/users/papandreou","html_url":"https://github.com/papandreou","followers_url":"https://api.github.com/users/papandreou/followers","following_url":"https://api.github.com/users/papandreou/following{/other_user}","gists_url":"https://api.github.com/users/papandreou/gists{/gist_id}","starred_url":"https://api.github.com/users/papandreou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/papandreou/subscriptions","organizations_url":"https://api.github.com/users/papandreou/orgs","repos_url":"https://api.github.com/users/papandreou/repos","events_url":"https://api.github.com/users/papandreou/events{/privacy}","received_events_url":"https://api.github.com/users/papandreou/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-25T21:38:35Z","updated_at":"2015-07-26T21:41:46Z","closed_at":"2015-07-26T21:41:46Z","pull_request":{"url":"https://api.github.com/repos/unexpectedjs/unexpected/pulls/194","html_url":"https://github.com/unexpectedjs/unexpected/pull/194","diff_url":"https://github.com/unexpectedjs/unexpected/pull/194.diff","patch_url":"https://github.com/unexpectedjs/unexpected/pull/194.patch"},"body":"I don't understand exactly how this fixes the problem, but it changes the stack from:\r\n\r\n```\r\nUnexpectedError: \r\nexpected 2 to equal 'wat'\r\n    at callInNestedContext (/home/andreas/work/unexpected/lib/Unexpected.js:653:44)\r\n    at Function.wrappedExpect.fail (/home/andreas/work/unexpected/lib/Unexpected.js:690:17)\r\n    at /home/andreas/work/unexpected/lib/assertions.js:425:20\r\n    at /home/andreas/work/unexpected/lib/Unexpected.js:698:28\r\n    at tryCatcher (/home/andreas/work/unexpected/node_modules/bluebird/js/main/util.js:24:31)\r\n    at Promise._settlePromiseFromHandler (/home/andreas/work/unexpected/node_modules/bluebird/js/main/promise.js:454:31)\r\n    at Promise._settlePromiseAt (/home/andreas/work/unexpected/node_modules/bluebird/js/main/promise.js:530:18)\r\n    at Promise._settlePromiseAtPostResolution (/home/andreas/work/unexpected/node_modules/bluebird/js/main/promise.js:224:10)\r\n    at Async._drainQueue (/home/andreas/work/unexpected/node_modules/bluebird/js/main/async.js:182:12)\r\n    at Async._drainQueues (/home/andreas/work/unexpected/node_modules/bluebird/js/main/async.js:187:10)\r\n    at Async.drainQueues (/home/andreas/work/unexpected/node_modules/bluebird/js/main/async.js:15:14)\r\n    at /home/andreas/work/unexpected/lib/workQueue.js:8:13\r\n    at Array.forEach (native)\r\n    at Object.workQueue.drain (/home/andreas/work/unexpected/lib/workQueue.js:7:20)\r\n    at oathbreaker (/home/andreas/work/unexpected/lib/oathbreaker.js:43:15)\r\n    at Function.wrappedExpect.withError (/home/andreas/work/unexpected/lib/Unexpected.js:696:24)\r\n```\r\n\r\nto\r\n\r\n```\r\nUnexpectedError: \r\nexpected 2 to equal 'wat'\r\n    at callInNestedContext (/home/andreas/work/unexpected/lib/Unexpected.js:653:44)\r\n    at Function.wrappedExpect.fail (/home/andreas/work/unexpected/lib/Unexpected.js:690:17)\r\n    at /home/andreas/work/unexpected/lib/assertions.js:425:20\r\n    at Function.wrappedExpect.withError (/home/andreas/work/unexpected/lib/Unexpected.js:702:28)\r\n    at Assertion.<anonymous> (/home/andreas/work/unexpected/lib/assertions.js:422:16)\r\n    at executeExpect (/home/andreas/work/unexpected/lib/Unexpected.js:720:34)\r\n    at Unexpected.expect (/home/andreas/work/unexpected/lib/Unexpected.js:798:22)\r\n    at Object.<anonymous> (/home/andreas/work/unexpected/argh.js:3: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```\r\n\r\nwhen I run my test script, `argh.js` with this content from the root of my unexpected checkout:\r\n\r\n```js\r\nvar expect = require('./lib/');\r\n\r\nexpect(2, 'to equal', 'wat');\r\n```\r\n\r\nIt's seems very likely that it's just masking a bug in oathbreaker or makePromise, though :/"},"comment":{"url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/comments/125042690","html_url":"https://github.com/unexpectedjs/unexpected/pull/194#issuecomment-125042690","issue_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/194","id":125042690,"user":{"login":"papandreou","id":373545,"avatar_url":"https://avatars.githubusercontent.com/u/373545?v=3","gravatar_id":"","url":"https://api.github.com/users/papandreou","html_url":"https://github.com/papandreou","followers_url":"https://api.github.com/users/papandreou/followers","following_url":"https://api.github.com/users/papandreou/following{/other_user}","gists_url":"https://api.github.com/users/papandreou/gists{/gist_id}","starred_url":"https://api.github.com/users/papandreou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/papandreou/subscriptions","organizations_url":"https://api.github.com/users/papandreou/orgs","repos_url":"https://api.github.com/users/papandreou/repos","events_url":"https://api.github.com/users/papandreou/events{/privacy}","received_events_url":"https://api.github.com/users/papandreou/received_events","type":"User","site_admin":false},"created_at":"2015-07-26T21:41:46Z","updated_at":"2015-07-26T21:41:46Z","body":"Superseeded by #197."}}