{"action":"created","issue":{"url":"https://api.github.com/repos/NeilFraser/JS-Interpreter/issues/53","repository_url":"https://api.github.com/repos/NeilFraser/JS-Interpreter","labels_url":"https://api.github.com/repos/NeilFraser/JS-Interpreter/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/NeilFraser/JS-Interpreter/issues/53/comments","events_url":"https://api.github.com/repos/NeilFraser/JS-Interpreter/issues/53/events","html_url":"https://github.com/NeilFraser/JS-Interpreter/issues/53","id":133303399,"number":53,"title":"Throw Error instead of String","user":{"login":"bioball","id":4590460,"avatar_url":"https://avatars.githubusercontent.com/u/4590460?v=3","gravatar_id":"","url":"https://api.github.com/users/bioball","html_url":"https://github.com/bioball","followers_url":"https://api.github.com/users/bioball/followers","following_url":"https://api.github.com/users/bioball/following{/other_user}","gists_url":"https://api.github.com/users/bioball/gists{/gist_id}","starred_url":"https://api.github.com/users/bioball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bioball/subscriptions","organizations_url":"https://api.github.com/users/bioball/orgs","repos_url":"https://api.github.com/users/bioball/repos","events_url":"https://api.github.com/users/bioball/events{/privacy}","received_events_url":"https://api.github.com/users/bioball/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-12T17:51:48Z","updated_at":"2016-05-06T22:52:15Z","closed_at":"2016-05-06T04:25:58Z","body":"`Error`s contain much more useful information, like the stack trace at the point of creating the `Error`. It's much harder to track these errors down when just strings are thrown.\r\n\r\nI'd be happy to submit a PR for this."},"comment":{"url":"https://api.github.com/repos/NeilFraser/JS-Interpreter/issues/comments/217582341","html_url":"https://github.com/NeilFraser/JS-Interpreter/issues/53#issuecomment-217582341","issue_url":"https://api.github.com/repos/NeilFraser/JS-Interpreter/issues/53","id":217582341,"user":{"login":"NeilFraser","id":250480,"avatar_url":"https://avatars.githubusercontent.com/u/250480?v=3","gravatar_id":"","url":"https://api.github.com/users/NeilFraser","html_url":"https://github.com/NeilFraser","followers_url":"https://api.github.com/users/NeilFraser/followers","following_url":"https://api.github.com/users/NeilFraser/following{/other_user}","gists_url":"https://api.github.com/users/NeilFraser/gists{/gist_id}","starred_url":"https://api.github.com/users/NeilFraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeilFraser/subscriptions","organizations_url":"https://api.github.com/users/NeilFraser/orgs","repos_url":"https://api.github.com/users/NeilFraser/repos","events_url":"https://api.github.com/users/NeilFraser/events{/privacy}","received_events_url":"https://api.github.com/users/NeilFraser/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T22:52:15Z","updated_at":"2016-05-06T22:52:15Z","body":"Oh, I see what you mean.  I was referring to errors inside the sandbox, you were referring to errors outside the sandbox.  Done.\r\n\r\nThough I've used:\r\n```\r\nthrow Error('Expecting original AST to start with a Program node.');\r\n```\r\nsince I don't see the need for the `new` keyword."}}