{"action":"created","issue":{"url":"https://api.github.com/repos/FPtje/simplerr/issues/5","repository_url":"https://api.github.com/repos/FPtje/simplerr","labels_url":"https://api.github.com/repos/FPtje/simplerr/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/FPtje/simplerr/issues/5/comments","events_url":"https://api.github.com/repos/FPtje/simplerr/issues/5/events","html_url":"https://github.com/FPtje/simplerr/pull/5","id":138603309,"number":5,"title":"Improved simplerr.SafeCall stack trace accuracy","user":{"login":"Bo98","id":1190754,"avatar_url":"https://avatars.githubusercontent.com/u/1190754?v=3","gravatar_id":"","url":"https://api.github.com/users/Bo98","html_url":"https://github.com/Bo98","followers_url":"https://api.github.com/users/Bo98/followers","following_url":"https://api.github.com/users/Bo98/following{/other_user}","gists_url":"https://api.github.com/users/Bo98/gists{/gist_id}","starred_url":"https://api.github.com/users/Bo98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bo98/subscriptions","organizations_url":"https://api.github.com/users/Bo98/orgs","repos_url":"https://api.github.com/users/Bo98/repos","events_url":"https://api.github.com/users/Bo98/events{/privacy}","received_events_url":"https://api.github.com/users/Bo98/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-04T22:22:41Z","updated_at":"2016-03-05T10:01:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/FPtje/simplerr/pulls/5","html_url":"https://github.com/FPtje/simplerr/pull/5","diff_url":"https://github.com/FPtje/simplerr/pull/5.diff","patch_url":"https://github.com/FPtje/simplerr/pull/5.patch"},"body":"Before it took the stack from the passed function's declaration. If the function called had errored way up higher in the stack, we would've not known about it under the previous implementation. This changes the stack fetching to inside an error handler using `xpcall`. The stack has not unwound at this point so the stack traces are more meaningful.\r\n\r\nThis has a slight downside of `xpcall` and `simplerr.SafeCall` now being included in the stack trace but it's in trade for a more useful stack trace. I don't think there's a way of reliably skipping/stopping the stack trace at `xpcall` (bearing in mind the function passed in can be calling it too). Personally, I don't think it matters too much but the previous impementation deliberately skipped `simplerr.SafeCall`."},"comment":{"url":"https://api.github.com/repos/FPtje/simplerr/issues/comments/192615232","html_url":"https://github.com/FPtje/simplerr/pull/5#issuecomment-192615232","issue_url":"https://api.github.com/repos/FPtje/simplerr/issues/5","id":192615232,"user":{"login":"FPtje","id":1202014,"avatar_url":"https://avatars.githubusercontent.com/u/1202014?v=3","gravatar_id":"","url":"https://api.github.com/users/FPtje","html_url":"https://github.com/FPtje","followers_url":"https://api.github.com/users/FPtje/followers","following_url":"https://api.github.com/users/FPtje/following{/other_user}","gists_url":"https://api.github.com/users/FPtje/gists{/gist_id}","starred_url":"https://api.github.com/users/FPtje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FPtje/subscriptions","organizations_url":"https://api.github.com/users/FPtje/orgs","repos_url":"https://api.github.com/users/FPtje/repos","events_url":"https://api.github.com/users/FPtje/events{/privacy}","received_events_url":"https://api.github.com/users/FPtje/received_events","type":"User","site_admin":false},"created_at":"2016-03-05T10:01:17Z","updated_at":"2016-03-05T10:01:17Z","body":"I'm currently working on filtering it out."}}