{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/12765","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/12765/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/12765/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/12765/events","html_url":"https://github.com/nodejs/node/pull/12765","id":225341493,"number":12765,"title":"src: do proper StringBytes error handling","user":{"login":"addaleax","id":899444,"avatar_url":"https://avatars1.githubusercontent.com/u/899444?v=3","gravatar_id":"","url":"https://api.github.com/users/addaleax","html_url":"https://github.com/addaleax","followers_url":"https://api.github.com/users/addaleax/followers","following_url":"https://api.github.com/users/addaleax/following{/other_user}","gists_url":"https://api.github.com/users/addaleax/gists{/gist_id}","starred_url":"https://api.github.com/users/addaleax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/addaleax/subscriptions","organizations_url":"https://api.github.com/users/addaleax/orgs","repos_url":"https://api.github.com/users/addaleax/repos","events_url":"https://api.github.com/users/addaleax/events{/privacy}","received_events_url":"https://api.github.com/users/addaleax/received_events","type":"User","site_admin":false},"labels":[{"id":155267414,"url":"https://api.github.com/repos/nodejs/node/labels/buffer","name":"buffer","color":"f7c6c7","default":false},{"id":155267502,"url":"https://api.github.com/repos/nodejs/node/labels/c++","name":"c++","color":"e11d21","default":false},{"id":155267357,"url":"https://api.github.com/repos/nodejs/node/labels/crypto","name":"crypto","color":"009800","default":false},{"id":155435785,"url":"https://api.github.com/repos/nodejs/node/labels/fs","name":"fs","color":"0052cc","default":false},{"id":281232761,"url":"https://api.github.com/repos/nodejs/node/labels/lib%20/%20src","name":"lib / src","color":"fad8c7","default":false},{"id":463619724,"url":"https://api.github.com/repos/nodejs/node/labels/lts-watch-v6.x","name":"lts-watch-v6.x","color":"d93f0b","default":false},{"id":155435816,"url":"https://api.github.com/repos/nodejs/node/labels/os","name":"os","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-30T17:30:02Z","updated_at":"2017-04-30T17:46:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/12765","html_url":"https://github.com/nodejs/node/pull/12765","diff_url":"https://github.com/nodejs/node/pull/12765.diff","patch_url":"https://github.com/nodejs/node/pull/12765.patch"},"body":"- Return `MaybeLocal`s from `StringBytes::Encode`\r\n- Add an `error` out parameter to pass JS exceptions to the callers (instead of directly throwing)\r\n- Simplify some of the string generation methods in `string_bytes.cc` by unifying the `EXTERN_APEX` logic\r\n- Reduce usage of deprecated V8 APIs.\r\n- Remove error handling logic from JS, the `buffer.*Slice()` methods now throw errors themselves.\r\n- Left TODO comments for future semver-major error message improvements.\r\n\r\nThis paves the way for better error messages coming out of the StringBytes methods.\r\n\r\nRef: https://github.com/nodejs/node/issues/3175\r\n\r\n<!--\r\nThank you for your pull request. Please provide a description above and review\r\nthe requirements below.\r\n\r\nBug fixes and new features should include tests and possibly benchmarks.\r\n\r\nContributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes\r\n- [x] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#commit-guidelines)\r\n\r\n##### Affected core subsystem(s)\r\n\r\nbuffer, fs, os, crypto\r\n\r\n----\r\n\r\nCI: https://ci.nodejs.org/job/node-test-commit/9528/\r\n\r\nMaybe @TimothyGu or @tniessen would want to review?\r\n\r\nAlso, /cc @MylesBorins , if you’re still interested in #3175 … that should become a lot easier after this :)"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/298246158","html_url":"https://github.com/nodejs/node/pull/12765#issuecomment-298246158","issue_url":"https://api.github.com/repos/nodejs/node/issues/12765","id":298246158,"user":{"login":"addaleax","id":899444,"avatar_url":"https://avatars1.githubusercontent.com/u/899444?v=3","gravatar_id":"","url":"https://api.github.com/users/addaleax","html_url":"https://github.com/addaleax","followers_url":"https://api.github.com/users/addaleax/followers","following_url":"https://api.github.com/users/addaleax/following{/other_user}","gists_url":"https://api.github.com/users/addaleax/gists{/gist_id}","starred_url":"https://api.github.com/users/addaleax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/addaleax/subscriptions","organizations_url":"https://api.github.com/users/addaleax/orgs","repos_url":"https://api.github.com/users/addaleax/repos","events_url":"https://api.github.com/users/addaleax/events{/privacy}","received_events_url":"https://api.github.com/users/addaleax/received_events","type":"User","site_admin":false},"created_at":"2017-04-30T17:46:48Z","updated_at":"2017-04-30T17:46:48Z","body":"> Lots of new TODOs that can probably be fixed in this PR pretty quickly.\r\n\r\nI’d like to keep them for a quick semver-major follow-up PR after this lands, if that’s okay."}}
{"actor":{"display_login":"addaleax"}}