{"action":"created","issue":{"url":"https://api.github.com/repos/probmods/webppl/issues/292","repository_url":"https://api.github.com/repos/probmods/webppl","labels_url":"https://api.github.com/repos/probmods/webppl/issues/292/labels{/name}","comments_url":"https://api.github.com/repos/probmods/webppl/issues/292/comments","events_url":"https://api.github.com/repos/probmods/webppl/issues/292/events","html_url":"https://github.com/probmods/webppl/issues/292","id":127715883,"number":292,"title":"Readable runtime error messages via source maps","user":{"login":"chrisranderson","id":5461398,"avatar_url":"https://avatars.githubusercontent.com/u/5461398?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisranderson","html_url":"https://github.com/chrisranderson","followers_url":"https://api.github.com/users/chrisranderson/followers","following_url":"https://api.github.com/users/chrisranderson/following{/other_user}","gists_url":"https://api.github.com/users/chrisranderson/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisranderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisranderson/subscriptions","organizations_url":"https://api.github.com/users/chrisranderson/orgs","repos_url":"https://api.github.com/users/chrisranderson/repos","events_url":"https://api.github.com/users/chrisranderson/events{/privacy}","received_events_url":"https://api.github.com/users/chrisranderson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-01-20T16:06:00Z","updated_at":"2016-02-05T21:09:42Z","closed_at":null,"body":"I've talked with Andreas a bit about figuring out how to tackle this, and after looking through the code and the old stack trace branch, here's my best shot for how to get it done:\r\n\r\n- have sweet.js generate source maps [here](https://github.com/probmods/webppl/blob/4b8c735ee982a04815230d30e93c1f645fdc71a3/src/main.js#L54).\r\n- when [the code is evaluated](https://github.com/probmods/webppl/blob/4b8c735ee982a04815230d30e93c1f645fdc71a3/src/main.js#L179), catch errors and translate the JS stack traces to WebPPL stack traces using the source map.\r\n\r\n**Questions**\r\n- What do I do with the code that you compile for every program? It looks like you combine the user's source with something else (header.wppl?).\r\n- I haven't thought much about converting the error message itself. Is it okay if I work on that after stack traces are converted?\r\n- Should I use something like [stacktrace.js](https://github.com/stacktracejs/stacktrace.js) or some other library for parsing the JS stack trace?\r\n\r\nHopefully I'm on the right track."},"comment":{"url":"https://api.github.com/repos/probmods/webppl/issues/comments/180554663","html_url":"https://github.com/probmods/webppl/issues/292#issuecomment-180554663","issue_url":"https://api.github.com/repos/probmods/webppl/issues/292","id":180554663,"user":{"login":"longouyang","id":14802,"avatar_url":"https://avatars.githubusercontent.com/u/14802?v=3","gravatar_id":"","url":"https://api.github.com/users/longouyang","html_url":"https://github.com/longouyang","followers_url":"https://api.github.com/users/longouyang/followers","following_url":"https://api.github.com/users/longouyang/following{/other_user}","gists_url":"https://api.github.com/users/longouyang/gists{/gist_id}","starred_url":"https://api.github.com/users/longouyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/longouyang/subscriptions","organizations_url":"https://api.github.com/users/longouyang/orgs","repos_url":"https://api.github.com/users/longouyang/repos","events_url":"https://api.github.com/users/longouyang/events{/privacy}","received_events_url":"https://api.github.com/users/longouyang/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T21:09:42Z","updated_at":"2016-02-05T21:09:42Z","body":"Pardon my ignorance if this isn't sensible at all but: would switching from continuations to promises buy us anything here?"}}